Bad @WebFilter annotation

Create issue
Issue #26 resolved
Vladimir Dzhuvinov created an issue

Reported by Mario Daepp:

The current version 2.1.1 of CORSFilter doesn't deploy on WebLogic (version 12.1.2):

weblogic.j2ee.dd.xml.AnnotationProcessException: [HTTP:101397]The urlPatterns attribute, servletNames attribute, or value attribute of the WebFilter annotation MUST be specified: com.thetransactioncompany.cors.CORSFilter.

The Servlet 3.0 Specification states in chapter 8.1.2: <quote> The urlPatterns attribute, servletNames attribute or the value attribute of the annotation MUST be specified. All other attributes are optional with default settings (see javadocs for more details). </quote>

So the annotation @WebFilter(asyncSupported = true) on CORSFilter is in fact illegal as per the spec. Could you please remove this annotation in the next version and update the docs to state that <async-supported>true</async-supported> must be specified in web.xml.

Comments (2)

  1. Log in to comment