开发者

How do web.xml filters work? Can you have two filters map to all pages (/*) and specify the order?

开发者 https://www.devze.com 2022-12-18 01:41 出处:网络
I want to use Spring Security, and it says to map the filter to /***.But I already have a filter mapped to /*, which is the Tuckee URLRewrite filter.

I want to use Spring Security, and it says to map the filter to /***. But I already have a filter mapped to /*, which is the Tuckee URLRewrite filter.

Is it possible to map two filt开发者_开发技巧ers to the same thing, and also is there a way to specify the order that the filters get called?


Yes, you can:

The servlet 2.5 xsd:

The order in which filters are invoked is the order in which filter-mapping declarations that match a request URI for a servlet appear in the list of filter-mapping elements

i.e. it depends on the order of your <filter-mapping> elements in the web.xml

0

精彩评论

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