24

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?

Bozho
  • 588,226
  • 146
  • 1,060
  • 1,140
Kyle
  • 21,377
  • 37
  • 113
  • 200

1 Answers1

40

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

Bozho
  • 588,226
  • 146
  • 1,060
  • 1,140