I have a Java servlet marked with a sign load-on-startup
and implemented init()
. As part of the logic, init()
there is a call validate()
that determines whether things are really real.
My problem is that if it validate()
determines that everything is bad, I want the application not to start as a warning that something needs to be fixed. I tried to quit ServletException
, and while this information was sent to my console, I could still send traffic in the application, and it responded.
Finally, my hands are somewhat tied to the timing. My servlet extends the base class, which sets up the content I'm trying to test.
If there is a solution that I will need to run on Tomcat and WebLogic.
source
share