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: Apache does not override errors coming from Tomcat
Date Wed, 25 Jan 2006 18:32:30 GMT
On 1/24/06, Akoulov, Alexandre <alexandre.akoulov@citigroup.com> wrote:
> Hi all,
>
> I'd appreciate if you could help with the following problem.
>
> In our environment apache 1.3.33 acts as a web server that dispatches certain requests
to tomcat 5.5. What we're currently trying to achieve is to make apache handle errors that
come from tomcat (eg, if tomcat throws 404 Not Found error let apache display the appropriate
html page).
>
> We've used ErrorDocument directive in apache to specify what html pages to show for different
errors:
>
> ErrorDocument 400 /forbidden.html
> ErrorDocument 401 /unauthorised.html
> ErrorDocument 403 /forbidden.html
> ErrorDocument 404 /missing.html
> ErrorDocument 500 /server_error.html
>
>
> The problem is that apache does not override errors that come from tomcat but rather
propagates them to the client (web browser). Eg, if the user has requested the resource that
does not exist in tomcat he/she gets "HTTP Status 404 - ..." page generated by tomcat while
we're expecting it to be overridden by apache with the missing.html page.
>
> Any ideas on what's happening?
>
>
> Kind regards,
>
> Sasha.

I think the Apache ErrorDocuments only apply to errors generated
within Apache. For Tomcat errors, Apache is just acting as a proxy and
returning whatever response page that Tomcat generated.

You can customize Tomcat's error pages by putting <error-page>
declarations in web.xml.
--
Len

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message