Provide Error Handling Page : Error Page « JSP « Java Tutorial






index.jsp

<%@ page errorPage="errorPage.jsp" %>
<HTML>
    <HEAD>
        <TITLE>Using an Error Page</TITLE>
    </HEAD>

    <BODY>
        <H1>Using an Error Page</H1>
        <%
            int value = 1;
            value = value / 0;
        %>
    </BODY>
</HTML>

errorPage.jsp

<%@ page isErrorPage="true" %>
<HTML>
    <HEAD>
        <TITLE>An Error Page</TITLE>
    </HEAD>

    <BODY>
        <H1>An Error Page</H1>
        You are in an Error Page
    </BODY>
</HTML>
  Download:  ProvideErrorHandlingPage.zip( 1 k)








23.30.Error Page
23.30.1.Error page
23.30.2.Provide Error Handling Page
23.30.3.Pass Message to Error Handling Page
23.30.4.Display Error Message In Error Handling Page