How do web.xml filters work? Can you have two filters map to all pages (/*) and specify the order?
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
精彩评论