//File Name: generateErrorNoHandler.jsp
<%-- This scriptlet checks a hidden field to see whether or not to throw an exception --%>
<%
String hiddenField = request.getParameter("hiddenValue");
if ( hiddenField.equals("error"))
throw new java.lang.NullPointerException();
%>
Generate Error
This page generates an error when you click the button.