Sun Java System Web Server 7.0 Developer's Guide to Java Web Applications

Handling Exceptions

If an uncaught exception occurs in a JSP file, Sun Java System Web Server 7.0 generates an exception, usually a 404 or 500 error. To avoid this problem, set the errorPage attribute of the page directive, for example, <%@ page other_page_directive_attr_list errorPage=/oops.jsp%> .