web.xml中的filter格式

Posted yancy-

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了web.xml中的filter格式相关的知识,希望对你有一定的参考价值。

servlet中的过滤器格式:

<filter>

<filter-name> xxxx</filter-name>

<filter-class> xxxx.aaaa</filter-class>

</filter>

<init-param>(可选)

<parma-name>charset</param-name>

<param-value> UTF-8</param-value>

</init-param>

<filter-mapping>

<filter-name> xxxx</filter-name>

<url-pattern> /* </url-pattern>

</filter-mapping>

以上是关于web.xml中的filter格式的主要内容,如果未能解决你的问题,请参考以下文章

web.xml中的filter标签

使用 Tomcat,@WebFilter 不适用于 web.xml 中的 <filter-mapping>

struts2在web.xml中的配置

Web.xml详解(转)(Filter,context,listener)

web.xml和Filter的对应关系

web.xml和Filter的对应关系