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 filters to the same thing, and also is there a way to specify the order that the filters get called?
Yes. You can. The order you placed in web. xml will execute.
A filter is an object that is invoked at the preprocessing and postprocessing of a request. It is mainly used to perform filtering tasks such as conversion, logging, compression, encryption and decryption, input validation etc. The servlet filter is pluggable, i.e. its entry is defined in the web.
javax.servlet. Interface Filter. public interface Filter. A filter is an object that performs filtering tasks on either the request to a resource (a servlet or static content), or on the response from a resource, or both. Filters perform filtering in the doFilter method.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With