tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Len Popp" <len.p...@gmail.com>
Subject Re: Possible to send 503 status over JK?
Date Wed, 26 Jul 2006 15:48:06 GMT
The default error page is hard-coded in
org.apache.catalina.valves.ErrorReportValve.report()
-- 
Len

On 7/26/06, Propes, Barry L <barry.l.propes@citigroup.com> wrote:
> are the HTML error pages created dynamically? Are or they where they can be extracted
(presumably out of a jar file) and then edited and the jar recompiled?
> I don't find the docs anywhere within my Tomcat version (4.1.3).
>
> -----Original Message-----
> From: Len Popp [mailto:len.popp@gmail.com]
> Sent: Tuesday, July 25, 2006 8:26 PM
> To: Tomcat Users List
> Subject: Re: Possible to send 503 status over JK?
>
>
> 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 <hassan.schroeder@gmail.com> wrote:
> > On 7/25/06, Rick G <tomcatdev@vidyah.com> 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 ------------------------ hassan.schroeder@gmail.com
> >
> > ---------------------------------------------------------------------
> > 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
> >
> >
>
> ---------------------------------------------------------------------
> 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
>
>
> ---------------------------------------------------------------------
> 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
>
>

---------------------------------------------------------------------
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


Mime
View raw message