1

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

Andrew
  • 13,757
  • 13
  • 66
  • 84
Ashok
  • 327
  • 2
  • 4
  • 11

1 Answers1

2

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

Community
  • 1
  • 1
Ramesh PVK
  • 15,200
  • 2
  • 46
  • 50