Web.xml文件配置将过滤全部请求修改为指定请求:
<filter>
<filter-name>ProjectFilter</filter-name>
<filter-class>com.itcast.xml.filter.ProjectFilter</filter-class>
<init-param>
<param-name>passUrl</param-name>
<param-value>index.jsp;login.html;regist.html;</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>ProjectFilter</filter-name>
<!-- 防止过滤掉图片等安全静态资源请求 -->
<url-pattern>*.do(*.jsp)</url-pattern>
<!--<url-pattern>/*</url-pattern>-->
</filter-mapping>
</filter>