https://issues.apache.org/bugzilla/show_bug.cgi?id=51376
Bug #: 51376 Summary: Dynamically added Servlet instances ignore setLoadOnStartup(), @ServletSecurity, etc Product: Tomcat 7 Version: 7.0.14 Platform: PC OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Catalina AssignedTo: dev@tomcat.apache.org ReportedBy: axt...@gmail.com Classification: Unclassified When a pre-existing instance of Servlet class is added dynamically by calling ServletContext.addServlet(String, Servlet) in ServletContainerInitializer, multiple problems arise: * setLoadOnStartup() is ignored * @ServletSecurity is ignored * destroy() can be called on non-initialized servlet Adding a servlet class (addServlet(String, String), addServlet(String, Class)) doesn't have this problems. It happens because methods of org.apache.catalina.core.StandardWrapper treat presence of servlet instance as an indicator of the fact that servlet have been initialized, that is not true when addServlet(String, Servlet) is used. -- 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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org