tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick G" <tomcat...@vidyah.com>
Subject RE: Possible to send 503 status over JK?
Date Wed, 26 Jul 2006 13:37:48 GMT
I'll do some looking when I have a chance to see if I can figure out what is
different between tomcats 503 and mod_jk's. Off the top of my head, the
Tomcat 503 is returning content (the generated error page), where I'm
guessing when tomcat is down and mod_jk returns the 503, there most likely
is no content returned.   Maybe I'll try recompiling tomcat to not generate
the error page content just to see if the behavior changes.

Thanks again for your input Len,

-Rick 

-----Original Message-----
From: Len Popp [mailto:len.popp@gmail.com] 
Posted At: Wednesday, July 26, 2006 6:21 AM
Subject: Re: Possible to send 503 status over JK?

I'm not sure why it works that way. I guess the idea is that if Tomcat has
generated an error page, Apache shouldn't mess with it.

When Tomcat is down the situation is different - the error comes from Apache
(mod_jk), not Tomcat, so Apache is reponsible for the status code and error
page.
--
Len

On 7/26/06, Rick G <tomcatdev@vidyah.com> wrote:
> Hi Len,
>    On your comments, I totally understand that you can't override the 
> tomcat
> 503 error page in a standalone Tomcat set up, especially from a webapp 
> that isn't running. However, can you explain ...
>
> > 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.
>
> I don't understand why Apache can't override it if it has the right 
> status code, isn't that the whole point of having a status code 
> handler in httpd.conf?  Just seems that if Apache can handle the 503 
> with Tomcat down, that it shouldn't work any different with Tomcat 
> running but with a webapp down, as long as if its returning the same
status code.
>
> Thank you much for your feedback,
>
> Rick
>
> -----Original Message-----
> From: Len Popp [mailto:len.popp@gmail.com] Posted At: Tuesday, July 
> 25, 2006 6:26 PM Posted To: Tomcat Dev
> Conversation: Possible to send 503 status over JK?
> 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



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