You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Veit Guna <ve...@gmx.de> on 2006/11/20 22:10:02 UTC

Global custom 503 error page

Hi.

Is it really true, that one can't create at least a global error page
for 503 errors in tomcat? I understand, that a webapp that is stopped,
can't serve it's own custom 503 error page. Sounds clear. But a general
one should be possible?!

I'm using tomcat behind apache and if tomcat isn't started at all, I can
use the custom 503 page from apache. That works. But if one webapp is
stopped, I get the default tomcat 503 page.

Any hints?

regards,
Veit

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Global custom 503 error page

Posted by Len Popp <le...@gmail.com>.
There's no easy way. The 503 error page is hard-coded in
org.apache.catalina.valves.ErrorReportValve. You can replace that class with
your own implementation, specified by the <Host> attribute
errorReportValveClass. (I haven't tried that myself, I just read about it in
the Tomcat docs.)
-- 
Len

On 11/20/06, Veit Guna <ve...@gmx.de> wrote:
>
> Hi.
>
> Is it really true, that one can't create at least a global error page
> for 503 errors in tomcat? I understand, that a webapp that is stopped,
> can't serve it's own custom 503 error page. Sounds clear. But a general
> one should be possible?!
>
> I'm using tomcat behind apache and if tomcat isn't started at all, I can
> use the custom 503 page from apache. That works. But if one webapp is
> stopped, I get the default tomcat 503 page.
>
> Any hints?
>
> regards,
> Veit
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>