You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Thorsten Scherler <th...@juntadeandalucia.es> on 2008/06/02 14:40:57 UTC

[users@httpd] custom-error with httpd and tomcat

Hello all,

I have an application that is build in two tiers, where Apache httpd is
before an Apache Tomcat where I execute an Apache Cocoon web app.

I tried with 
ErrorDocument 503 "error 1"
ErrorDocument 500 "error 2"

Now if I do not start tomcat I see the "error 1" page like I expected
with the header:
Status=Service Temporarily Unavailable - 503

However when my cocoon app is returning a page with stacktrace and the
http header 500, the httpd is ignoring the ErrorDocument.
Status=Internal Server Error - 500

Discussing the issue with my colleagues it seems that the ErrorDocument
does not analysis the header of the response but only will use the
directive if the error occurred in the same httpd server.

Maybe it is the way we are accessing the tomcat from our httpd server.
We are using simple "RewriteRule". 

How can I tell httpd to use the ErrorDocument when my servlet response
with Status=Internal Server Error - 500?

TIA for any information.

salu2
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] custom-error with httpd and tomcat

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
On Mon, 2008-06-02 at 09:13 -0400, Eric Covener wrote:
> On Mon, Jun 2, 2008 at 8:40 AM, Thorsten Scherler
> <th...@juntadeandalucia.es> wrote:
> 
> > ErrorDocument 503 "error 1"
> > ErrorDocument 500 "error 2"
> >
> > Now if I do not start tomcat I see the "error 1" page like I expected
> > with the header:
> > Status=Service Temporarily Unavailable - 503
> >
> > However when my cocoon app is returning a page with stacktrace and the
> > http header 500, the httpd is ignoring the ErrorDocument.
> > Status=Internal Server Error - 500
> >
> 
> http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxyerroroverride

Thanks very much.

For the archive 
http://wiki.apache.org/cocoon/ApacheModProxy
gives a detailed explanation. 

salu2
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] custom-error with httpd and tomcat

Posted by Eric Covener <co...@gmail.com>.
On Mon, Jun 2, 2008 at 8:40 AM, Thorsten Scherler
<th...@juntadeandalucia.es> wrote:

> ErrorDocument 503 "error 1"
> ErrorDocument 500 "error 2"
>
> Now if I do not start tomcat I see the "error 1" page like I expected
> with the header:
> Status=Service Temporarily Unavailable - 503
>
> However when my cocoon app is returning a page with stacktrace and the
> http header 500, the httpd is ignoring the ErrorDocument.
> Status=Internal Server Error - 500
>

http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxyerroroverride
-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org