A simple generic way is to use a filter which executes on all requests.
If the ServletContextListener has an error - it can set a variable in the
application context.
Then the filter can check for the existence of that variables. Then forward
to an error page.
For example ...
doFilter( ... )
PROTECTED]
Sent: Thursday, January 08, 2004 7:36 PM
To: Tomcat User List
Subject: ServletContextListener: how to suspend web app on error
Seems like a simple question, can't seem to find the answer...
If an error occurs in the #contextInitialized() method of an object
that
implements
Seems like a simple question, can't seem to find the answer...
If an error occurs in the #contextInitialized() method of an object that
implements ServletContextListener, how can I suspend the web application
so that it is unavailable for use by clients?
Specifically, I have a