Solution:
The files used to run the application are:
1. Exception.jsp
2. Example.html
//Exception.jsp
<html>
<body>
<%@ page errorPage="example.jsp" %>
Example for Null Pointer exception:
<%
String s=null;
s.length();
%>
</body>
</html>
//Error handler file
//Example.jsp
<html>The output of the program is as shown in Figure 10.3.
<body>
<%@ page isErrorPage="true" %>
The error is:
<%= exception %>
</body>
</html>
0 nhận xét:
Post a Comment