web.xml 过滤器配置
2015-01-19 14:33
302 查看
<filter> <filter-name>Filter的名字</filter-name> <filter-class>Fliter类的名称(过滤类完整的名字包括包名)</filter-class> <init-param> <!--初始化参数,可以是多对 --> <description>描述信息,可省略</description> <param-name>参数名称</param-name> <param-value>参数值</param-value> </init-param> </filter> <filter-mapping> <filter-name>Filter的名字</filter-name> <url-pattern>用户请求的url,和指定的url匹配是触发的过滤工作</url-pattern> <despacher>默认是request(还包括include、forword、error)</despacher> </filter-mapping> 配置错误页面的过滤器 <error-page> <error-code>404</error-code> <location>/error.jsp</location> </error-page> <error-page> <error-code>500</error-code> <location>/error.jsp</location> </error-page>
相关文章推荐
- web.xml中配置session超时过滤器
- 怎么在web.xml配置spring,struts2配置以及过滤器
- web.xml中配置CharacterEncodingFilter编码过滤器的原理
- struts2需要在web.xml中配置的过滤器
- web.xml配置五个有用的过滤器
- jsp之初学过滤器二---web.xml配置错误
- 配置web.xml中Filter的(字符)过滤器
- web.xml配置五个有用的过滤器
- 自定义过滤器与struts2过滤器执行顺序(web.xml中的配置顺序)
- web.xml中的过滤器中的配置必须加载配置文件
- Java Web Project 的 web.xml 中 Struts2、Spring 配置与过滤器添加需知
- 如何在web.xml配置spring,struts2配置以及过滤器
- 通用的用户登录过滤器(SessionFilter)--【web.xml中配置】
- 错误信息nulljsp之初学过滤器二---web.xml配置错误
- web.xml有关过滤器的配置
- Web.xml过滤器配置及执行顺序概念
- web.xml配置struts过滤器struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter和FilterDispatcher的区别
- web.xml配置五个有用的过滤器
- struts2 2.5以上版本安装中web.xml的配置(包括核心过滤器filter)
- Shiro随笔(1:web.xml中的过滤器配置里,spring是如何关联shiro的)