Re: Overriding error page displayed when a context fails to initialize

2011-05-26 Thread Sai Pullabhotla
Thanks every one for your useful tips and suggestions. I was able to override the container's default error page using a custom error valve. For any one else that may have a need to do this... The key is to configure your Host element in the config to override the error report valve. This took a

Re: Overriding error page displayed when a context fails to initialize

2011-05-25 Thread Sai Pullabhotla
: Caldarale, Charles R wrote: From: Sai Pullabhotla [mailto:sai.pullabho...@jmethods.com] Subject: Re: Overriding error page displayed when a context fails to initialize What I'm looking for is a way to override the error pages of Tomcat at the global level (not application/context specific

Re: Overriding error page displayed when a context fails to initialize

2011-05-25 Thread Pid
On 25/05/2011 13:36, Sai Pullabhotla wrote: Thanks for the replies and suggestions. I don't think Tomcat falls back to the ROOT context if another context fails to start (unless I'm missing something). Just to try it out, I did create a subfolder called context1 in ROOT, with an index

Re: Overriding error page displayed when a context fails to initialize

2011-05-25 Thread Sai Pullabhotla
I made the context fail by not having the database available. Basically, in the contextInitialized method, we need to load various application settings from the database and if the DB is not up, the context fails to load. The custom error pages are defined in the web.xml for ROOT and context1.

Re: Overriding error page displayed when a context fails to initialize

2011-05-24 Thread chris derham
On Tue, May 24, 2011 at 9:59 AM, Sai Pullabhotla sai.pullabho...@jmethods.com wrote: I've a web application with two contexts ROOT and mycontext. Both contexts have custom error pages defined in the web.xml and everything works as expected in most cases. The only problem is that if my

Re: Overriding error page displayed when a context fails to initialize

2011-05-24 Thread Sai Pullabhotla
Thanks for the reply, Chris. We do several things during context initialization with the ServletContextListener hook. The contextInitialized method may not complete for various reasons, sometimes with checked exceptions and sometimes with unchecked exceptions. We just let Tomcat/JVM handle the

RE: Overriding error page displayed when a context fails to initialize

2011-05-24 Thread Caldarale, Charles R
From: Sai Pullabhotla [mailto:sai.pullabho...@jmethods.com] Subject: Re: Overriding error page displayed when a context fails to initialize What I'm looking for is a way to override the error pages of Tomcat at the global level (not application/context specific) There's no such mechanism

Re: Overriding error page displayed when a context fails to initialize

2011-05-24 Thread André Warnier
Caldarale, Charles R wrote: From: Sai Pullabhotla [mailto:sai.pullabho...@jmethods.com] Subject: Re: Overriding error page displayed when a context fails to initialize What I'm looking for is a way to override the error pages of Tomcat at the global level (not application/context specific