tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 51754] Tomcat7 filters from conf/web.xml are applied after filters defined in WEB-INF/web.xml
Date Fri, 02 Sep 2011 13:10:56 GMT

Mark Thomas <> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX

--- Comment #1 from Mark Thomas <> 2011-09-02 13:10:56 UTC ---
The short answer is that this can't be fixed. The comment at the beginning of
the webConfig() methods explains why (there were a number of spec breaking bugs
introduced by trying to process the global web.xml file earlier).

I am not aware of the spec even mentioning default web.xml settings provided by
the container. This is likely to vary from container to container.

I would suggest the following:
- Define a ServletContextListener in conf/web.xml
- Use this to add the filters programmatically during the contexInitialized()
- Use the isMatchAfter parameter of the addMappingXXX methods of
FilterRegistration to insert the filters before those defined in any web.xml

Bugzilla isn't really the place to go into details on exactly how to do this.
If the above isn't enough, please use the Tomcat users mailing list for further

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message