• <bdo id='u2akq'></bdo><ul id='u2akq'></ul>

    <legend id='u2akq'><style id='u2akq'><dir id='u2akq'><q id='u2akq'></q></dir></style></legend>
  1. <tfoot id='u2akq'></tfoot>

    <small id='u2akq'></small><noframes id='u2akq'>

    <i id='u2akq'><tr id='u2akq'><dt id='u2akq'><q id='u2akq'><span id='u2akq'><b id='u2akq'><form id='u2akq'><ins id='u2akq'></ins><ul id='u2akq'></ul><sub id='u2akq'></sub></form><legend id='u2akq'></legend><bdo id='u2akq'><pre id='u2akq'><center id='u2akq'></center></pre></bdo></b><th id='u2akq'></th></span></q></dt></tr></i><div id='u2akq'><tfoot id='u2akq'></tfoot><dl id='u2akq'><fieldset id='u2akq'></fieldset></dl></div>

    1. 除了一个 servlet 之外,过滤器映射到 Struts2 吗?

      Filter mapping for everything to Struts2 besides one servlet?(除了一个 servlet 之外,过滤器映射到 Struts2 吗?)
    2. <small id='dZtxK'></small><noframes id='dZtxK'>

        <tbody id='dZtxK'></tbody>
            <i id='dZtxK'><tr id='dZtxK'><dt id='dZtxK'><q id='dZtxK'><span id='dZtxK'><b id='dZtxK'><form id='dZtxK'><ins id='dZtxK'></ins><ul id='dZtxK'></ul><sub id='dZtxK'></sub></form><legend id='dZtxK'></legend><bdo id='dZtxK'><pre id='dZtxK'><center id='dZtxK'></center></pre></bdo></b><th id='dZtxK'></th></span></q></dt></tr></i><div id='dZtxK'><tfoot id='dZtxK'></tfoot><dl id='dZtxK'><fieldset id='dZtxK'></fieldset></dl></div>
          1. <tfoot id='dZtxK'></tfoot>
              <bdo id='dZtxK'></bdo><ul id='dZtxK'></ul>

                <legend id='dZtxK'><style id='dZtxK'><dir id='dZtxK'><q id='dZtxK'></q></dir></style></legend>
              1. 本文介绍了除了一个 servlet 之外,过滤器映射到 Struts2 吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我有一个 Struts2 (2.1.8.1) Web 应用程序.我的 web.xml 看起来像,

                I have a Struts2 (2.1.8.1) web application. My web.xml looks like,

                  <filter>
                    <filter-name>struts2</filter-name>
                    <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
                  </filter>
                
                  <filter-mapping>
                    <filter-name>struts2</filter-name>
                    <url-pattern>/*</url-pattern>
                  </filter-mapping>
                

                这被配置为将所有请求映射到 struts 过滤器.我想在我的 Web 应用程序中添加一个 servlet.我想将具有特定 url 模式的所有请求发送到该 servlet.我希望其他所有内容都转到我的 struts servlet.

                This is configured to map all requests to the struts filter. I want to add a servlet in my web application. I want to send all requests with a certain url pattern to that servlet. I want everything else to go to my struts servlet.

                我知道我只能将*.action"映射到 struts servlet,但我讨厌 .action 在我所有 URL 的末尾.

                I know I could only map "*.action" to the struts servlet, but I hate .action being on the end of all my URL's.

                推荐答案

                在你的struts.xml中添加:

                In your struts.xml add:

                <constant name="struts.action.excludePattern" value="/ServletToExcludeFromStruts*"/>
                

                对于多个排除项,该值也以逗号分隔.请参阅 http://struts.apache.org/2.2.1/docs/webxml.html

                The value be comma delimited as well for multiple exclusions. See http://struts.apache.org/2.2.1/docs/webxml.html

                这篇关于除了一个 servlet 之外,过滤器映射到 Struts2 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Java Bytecode Manipulation Library Suggestions(Java 字节码操作库建议)
                Java CLI UI-design: frameworks or libraries?(Java CLI UI 设计:框架还是库?)
                About the use of Beans.xml configuration file in Spring Framework application(关于Spring Framework应用中Beans.xml配置文件的使用)
                What is the difference between Spring, Struts, Hibernate, JavaServer Faces, Tapestry?(Spring、Struts、Hibernate、JavaServer Faces、Tapestry 有什么区别?)
                Are there any android application framework like spring?(有没有像spring这样的android应用程序框架?)
                Java Swing based game framework. Any advice?(基于 Java Swing 的游戏框架.有什么建议吗?)
                  <bdo id='KKq9r'></bdo><ul id='KKq9r'></ul>

                • <i id='KKq9r'><tr id='KKq9r'><dt id='KKq9r'><q id='KKq9r'><span id='KKq9r'><b id='KKq9r'><form id='KKq9r'><ins id='KKq9r'></ins><ul id='KKq9r'></ul><sub id='KKq9r'></sub></form><legend id='KKq9r'></legend><bdo id='KKq9r'><pre id='KKq9r'><center id='KKq9r'></center></pre></bdo></b><th id='KKq9r'></th></span></q></dt></tr></i><div id='KKq9r'><tfoot id='KKq9r'></tfoot><dl id='KKq9r'><fieldset id='KKq9r'></fieldset></dl></div>

                    <small id='KKq9r'></small><noframes id='KKq9r'>

                        <tfoot id='KKq9r'></tfoot>

                          <tbody id='KKq9r'></tbody>
                          <legend id='KKq9r'><style id='KKq9r'><dir id='KKq9r'><q id='KKq9r'></q></dir></style></legend>