Reputation: 337
in jsp page is "a.jsp"
,if i use <%@ page errorpage="b.jsp" %>
directive in "a.jsp"
,My Question is how to use errorpage in jsp?what are the source code to keep in "b.jsp"
,Please explain in detail
Upvotes: 1
Views: 846
Reputation: 15446
Your b.jsp
which is error page should look like this:
<%@ page isErrorPage="true" import="java.io.*"%>
............
............
<!--Write your custom error message>
............
<!--Print your exception if required>
<%exception.printStackTrace(new java.io.PrintWriter(out));%>
References
Upvotes: 2