当前位置: 代码迷 >> Web前端 >> 如何在web.xml中配置一个<filter>对应多个<filter-地图ping>
  详细解决方案

如何在web.xml中配置一个<filter>对应多个<filter-地图ping>

热度:235   发布时间:2013-03-10 09:38:39.0
怎么在web.xml中配置一个<filter>对应多个<filter-mapping>
   <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

  相关解决方案