On 1/24/06, Akoulov, Alexandre <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]