tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
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
https://issues.apache.org/bugzilla/show_bug.cgi?id=51754

Mark Thomas <markt@apache.org> changed:

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

--- Comment #1 from Mark Thomas <markt@apache.org> 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
advice.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message