-
Bug
-
Resolution: Obsolete
-
Major
-
None
-
None
I have created Servlet 3.0 filter in WebApplicationInitializer.onStartup() for example the following way:
public void onStartup(ServletContext servletContext) throws ServletException {
String servletName = "someServlet";
String[] mappings = new String[]
;
Servlet servlet = FooServlet();
ServletRegistration.Dynamic s = servletContext.addServlet(servletName, servlet);
s.setLoadOnStartup(1);
s.addMapping(mappings);
Filter filter = new FooFilter("argument");
String[] servletNames = new String[]
;
FilterRegistration.Dynamic f = servletContext.addFilter("fooFilter", filter);
f.addMappingForServletNames(null, false, servletNames);
}
My problem is that jboss-web implemntation 7.0.13+ in StartdardContext.filterStart() along with ApplicationFilterConfig.getFilter() always tries to create new instance of the Filter via default constructor.
My FooFilter does not have default constructor and therefore my application cannot be deployed.
Please, check current implementation in Tomcat 7.0.32, which does not contain this problem.
Also I have found that ApplicationFilterConfig has two similar atributes named filter and filterInstance. I guess it is quite wrong implementation and it is related to my problem.
- is related to
-
WFLY-941 Dynamic servlet filter destroy method not called
- Closed