title: Spring bean initialization fails but server start up
body: <p>When a spring bean(e.g. Controller) fails in initialization, it propagates exception to FrameworkServlet of spring mvc. For this case, the servlet shuts down bean factory and throws a RuntimeException to web container. However, other servlets are still initialized and the server starts up. The error of FrameworkServlet is ignored.</p>
  
  <p>Is there a way, I can propagate bean creation exceptions or servlet exceptions to other servlets? Can I fail tomcat startup if any of the servlet throws an exception?</p>
  
  <p>Update: Adding a listener as mentioned here (<a href="https://stackoverflow.com/questions/25347593/known-way-to-stop-server-when-spring-context-failed-to-load">Known way to stop server when spring context failed to load?</a>) fails startup. I get following exception: </p>
  
  <p>org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]</p>
  
  <p>I have my context.xml at this location  [/WEB-INF/spring/context.xml], which is configured in web.xml</p>