The recent messages on this topic have confused me, so I've spent part
of my evening running some tests.
=========
First, with Tomcat standalone:

Tomcat's default error pages can be overridden by an error-page
declaration in the webapp's web.xml. If there is no error-page
declared, Tomcat uses its default error page; it does *not* fall back
to a "global" error page declared in the ROOT webapp.

When a webapp is stopped, its error pages are not executed
(obviously), so Tomcat's default error pages are used.

Therefore it is not possible to override the 503 page when the webapp
is stopped. Tomcat always uses its default page.

In any case, the correct HTTP status code is returned to the browser.
=========
With Tomcat behind Apache and mod_jk:

As long as Tomcat is running, the situation is the same as above. JK
and Apache pass Tomcat's error pages and status codes back unchanged.
ErrorDocument declarations do not override Tomcat's error pages.

When Tomcat is down (not just one webapp stopped, but Tomcat not
running at all), you obviously don't get a Tomcat error page. Apache
generates the 503 error and uses its own error page. This page can be
overridden by ErrorDocument.

Again, the correct HTTP status codes are returned to the browser.

So, you can use a custom ErrorDocument to return a "Site Down" message
if Tomcat is down completely, but not if a webapp inside Tomcat is
stopped.

These tests were done with Tomcat 5.5.17, Apache 2.0.55, JK 1.2.15.
--
Len

On 7/25/06, Hassan Schroeder <[EMAIL PROTECTED]> wrote:
On 7/25/06, Rick G <[EMAIL PROTECTED]> wrote:

> The 500 is caught correctly, but I always end up seeing the tomcat generated
> error page for a 503.
> I guess this could be a mod_jk or apache issue if you are saying that tomcat
> is sending the right status code.
>
> Questions:
>  what version of tomcat you running?

that quick test was on 5.5.17 standalone just to confirm the correct
http header was being sent.

--
Hassan Schroeder ------------------------ [EMAIL PROTECTED]

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



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

Reply via email to