This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I'm trying to override a tomcat error page with apache httpd pages based on the http status code in the response. I do not want to use error pages in the war file specified in the web.xml. I only need the error code from the application. This is done using HttpServletResponse.sendError();.
Unfortunatly in nearly every situation, the tomcat error is displayed.
The code contains the following:
ErrorDocument 404 "Not found 404"
ErrorDocument 500 "Internal Server Error 500"
ErrorDocument 503 "Temp Unavailable 503"
This works in an environment where ProxyPass, ProxyPassRevere, ProxyPassReverseCookiePath are used.
However, when no reverse proxy is specified, I cannot get apache to override the tomcat prepared error pages.