tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Custom Error page when Tomcat is down?
Date Mon, 24 Jul 2006 20:29:25 GMT
Eric,

> I've been scouring the docs & newsgroups for the last hour or so, and have 
> been unable to find a solution to my problem.  Currently, I have tomcat 
> being access through the Apache httpd server, configured via the jk_mod 
> connector/module.

I have the same setup, and just use "ErrorDocument 500" for a particular
URL space and send the user to the "down" page, like this:

        <Location "/yourWebapp">
                ErrorDocument 403 forbidden.html
                ErrorDocument 404 not_found.html
                ErrorDocument 500 down.html

                # This one means 'servlet unavailable'
                ErrorDocument 503 down.html
        </Location>

Yes, Tomcat /can/ issue a "500" error code, but I have that caught in
Tomcat and the user is sent to an error page (and the status code
returned is 200, even for an error). In this case, Apache never
inadvertently sends a user to the "down" page when Tomcat /is/ running,
but encounters an error.

Hope that helps.

-chris



Mime
View raw message