//File: index.jsp
<%@ page errorPage="errPage.jsp" %>
<HTML>
<HEAD><TITLE> Simple error testing </TITLE></HEAD>
<BODY>
<%!
String nullString = null;
%>
<%-- Intentionally invoking a NullPointerException --%>
The length of the nullString is <%= nullString.length() %>
</BODY>
</HTML>
/////////////////////////////////////////////////////
//File: errPage.jsp
<%@ page isErrorPage="true" %>
Uncaught exception <%= exception %> has been encountered!
|