怎么在web.xml中配置一个<filter>对应多个<filter-mapping>
2013-03-07 14:07
435 查看
<filter>
<filter-name>loginFilter2</filter-name>
<filter-class>de.base.LoginFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>loginFilter2</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>loginFilter2</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
但不能排除某个具体的页面,比如不能排除index.jsp,
详见http://stackoverflow.com/questions/3125296/can-i-exclude-some-concrete-urls-from-url-pattern-inside-filter-mapping
<filter-name>loginFilter2</filter-name>
<filter-class>de.base.LoginFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>loginFilter2</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>loginFilter2</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
但不能排除某个具体的页面,比如不能排除index.jsp,
详见http://stackoverflow.com/questions/3125296/can-i-exclude-some-concrete-urls-from-url-pattern-inside-filter-mapping
相关文章推荐
- web.xml里<filter-mapping>中的<dispatcher>作用
- 一个web项目web.xml的配置中<context-param>配置作用
- 一个web项目web.xml的配置中<context-param>配置作用
- 一个web项目web.xml的配置中<context-param>配置作用
- SSH web.xml里<filter-mapping>中的<dispatcher>意思
- web.xml里<filter-mapping>中的<dispatcher>作用
- 一个web项目web.xml的配置中<context-param>配置作用
- 一个web项目web.xml的配置中<context-param>配置作用
- web.xml里<filter-mapping>中的<dispatcher>作用
- web.xml文件加载顺序 一、 1 、启动一个 WEB 项目的时候, WEB 容器会去读取它的配置文件 web.xml ,读取 <listener> 和 <context-param>
- web.xml里<filter-mapping>中的<dispatcher>作用
- 转载:web.xml里<filter-mapping>中的<dispatcher>作用
- 一个web项目web.xml的配置中<context-param>配置作用
- web.xml里<filter-mapping>中的<dispatcher>作用
- 一个web项目web.xml的配置中<context-param>配置作用
- web.xml配置中的<mime-mapping>
- web.xml里<filter-mapping>中的<dispatcher>作用
- 一个web项目web.xml的配置中<context-param>配置作用
- Spring配置web.xml的<servlet>标签
- logback.xml常用配置详解(三) <filter>