Using an Error Page Jsp : Errors « JSP « Java






Using an Error Page Jsp

//File: 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>


//File: errorPage.jsp
<%@ page isErrorPage="true" %>
<HTML>
    <HEAD>
        <TITLE>An Error Page</TITLE>
    </HEAD>

    <BODY>
        <H1>An Error Page</H1>
        There was an error! Don't Panic!!!
        <BR>
        Consult your physician immediately.
    </BODY>
</HTML>


           
       








UsinganErrorPageJsp.zip( 88 k)

Related examples in the same category

1.Simple error testing
2.Jsp Error Bean
3.Using the Exception Object in Jsp
4.Building a simple error handling page
5.Deal with the errors
6.Error without handler
7.JSP Error handler
8.Error Handling: compile error in JSP page
9.JSP error: no such page
10.Page with error in JSP directive and actions
11.JSP error detected
12.Advanced Dynamic Web Content Generation: form error checkAdvanced Dynamic Web Content Generation: form error check