-
1. Custom error responses by using virtualhost
mp911de Mar 16, 2011 12:03 PM (in response to mountainmountain)Hi there,
you should do both. For file not found (404) and internal server error (500, when your servlet raises an exception) you can use web.xml of your web-app
<error-page>
<error-code>404</error-code>
<location>/error/404.jsp</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/error/500.jsp</location>
</error-page>
In Apache you could use ErrorDocument 503 /error.html (in case your JBoss is not running). Please keep in mind, that ErrorDocument-path is relative to your document root.
Best regards,
Mark