>From reading the doc, it seems the filters are invoked in the order in
which they appear in filter-mapping in web.xml. However I have a
situation where I have 2 filters one mapped using <servlet-name> and
other one mapped using <url-pattern> and they are not being invoked in
the right order.

 

Below is how my filter mappings look

      <!--  Filter Mappings -->

      <filter-mapping>

            <filter-name>F1</filter-name>

            <servlet-name>MyServlet</servlet-name>

      </filter-mapping>

      <filter-mapping>

            <filter-name>F2</filter-name>

            <url-pattern>/foo/*</url-pattern>

      </filter-mapping>

 

For my request, they both match and I would have expected the order as
F1 --> F2. However they are being invoked in order F2 --> F1.

 

What am I doing wrong?

 

-Ajay

 

Reply via email to