Error Page Handling In JSP
In web deployment descriptor put following
<web-app>
<error-page>
<error-code>404</error-code>
<location>/file-not-found.html<location>
</error-page>
<error-page>
<error-code>javax.servlet.ServletException</error-code>
<location>/oopsy.jsp<location>
</error-page>
.. while using action
<error-page>
<error-code>404</error-code>
<location>/showError.do<location>
</error-page>
</web-app>