[WLS 12.1.2]Servlet 3.0- AddFilter Adds Filters In Wrong Order
(Doc ID 1996257.1)
Last updated on MAY 27, 2022
Applies to:Oracle WebLogic Server - Version 184.108.40.206.0 to 220.127.116.11.0 [Release 12c]
Information in this document applies to any platform.
When registering multiple filters in a ServletContainerInitializer like below:
context.addFilter("FilterA", new FilterA()).addMappingForUrlPatterns(null, false, "/*");
Where the second parameter (isMatchAfter) is false, filters are added in exactly the opposite order from what the spec states.
When isMatchAfter is false, filters are being added in the opposite order from how they were added. The spec clearly states that they should be added in the same order as they were added. This issue was discussed with a bug in Tomcat and the consensus was that Tomcat is doing it correctly: https://issues.apache.org/bugzilla/show_bug.cgi?id=54277
Therefore, WebLogic is doing it incorrectly.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document