This content has been marked as final.
Show 1 reply
-
1. Re: Custom HTTP Status 500 Error Response
adrian.brock Jan 6, 2002 4:34 AM (in response to rbottoms)Here is one solution.
1) Create a "root" deployment.
There already is one in catalina/webapps/ROOT
2) Add the error page
In that folder create error.html
3) in WEB-INF/web-xml add the line
<error-page><error-code>404</error-code>/error.html</error-page>
Choose error codes to suite. With the root context present you will now get 404 instead of 500 for
missing deployments.
4) Deployment
In the folder
jar cf .war *
this is a trick (no prefix means it is deployed as "/")
Copy .war into jboss/deploy
You should now have the jakarta example page and a 404
error page.
NOTE: If you deploy something else e.g.
tomcat-test.ear it will not use the error page,
it has its own web.xml
Regards,
Adrian