Created attachment 31563 [details] Patch for tomcat 8 Currently when a servlet with load-on-startup >=0 fails its startup, the context startup is still considered as OK. With some webapps (like spring-based ones with a DispatcherServlet), this makes no sense at all : if the servlet failed its startup, the webapp is unuseable and it would be more sensible to have tomcat mark the context as failed. Such a behavior is not specified in JEE specs, so I propose to have a new optional flag on Context and Host containers. In the attached patch, the flag is named failDeploymentIfServletLoadedOnStartupFails . If specified on Context, it overrides the value potentially specified at the Host level. The proposed patch for tomcat 8 passes checkstyle, provides a unit test and updates documentation. If it's OK with the patch, I'd also like to have it backported to tomcat 7.
It needs a shorter name.
what about "failCtxIfServletStartFails" ?
ping?
committed r1595690 to tomcat 8 trunk, will be available in tomcat 8.0.9. The new flag is named failCtxIfServletStartFails.
merged to tomcat 7, will be availble in 7.0.55