I boostrap spring context using ContextLoaderListener
.
Before this in web.xml I have my custom listener which pefrorms some checks. If those checks fail i do not want Spring context to be started.
How can i prevent Spring context loading if i had an Exception in another listener?
I would put some attribute in ServletContext, but i do not know how it can affect on loading of spring ctx.
Here is the very similar question: Stop deployment when Exception occurs in ServletContextListener