开发者

How to specify more than one named Servlet to be wrapped by a filter?

开发者 https://www.devze.com 2022-12-31 14:19 出处:网络
How to specify more than one named Se开发者_StackOverflow中文版rvlet to be wrapped by a filter?You can map a filter to one or more servlets (and you can map more than one filter to a servlet).

How to specify more than one named Se开发者_StackOverflow中文版rvlet to be wrapped by a filter?


You can map a filter to one or more servlets (and you can map more than one filter to a servlet).

...
<filter>
  <filter-name>filter_name</filter-name>
  <filter-class>filter_class</filter-class>
</filter>
...
<filter-mapping>
  <filter-name>filter_name</filter-name>
  <servlet-name>servlet_name_1</servlet-name>
</filter-mapping>
<filter-mapping>
  <filter-name>filter_name</filter-name>
  <servlet-name>servlet_name_2</servlet-name>
</filter-mapping>
...

See also

  • The Essentials of Filters
0

精彩评论

暂无评论...
验证码 换一张
取 消