My Oracle Support Banner

[WLS 12.1.2]Servlet 3.0- AddFilter Adds Filters In Wrong Order (Doc ID 1996257.1)

Last updated on JUNE 02, 2023

Applies to:

Oracle WebLogic Server - Version 12.1.2.0.0 to 12.1.3.0.0 [Release 12c]
Information in this document applies to any platform.

Symptoms

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.

Changes

 

Cause

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
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.