What is isErrorPage attribute in JSP?

JSPJava 8Object Oriented ProgrammingProgramming

The errorPage attribute tells the JSP engine which page to display if there is an error while the current page runs. The value of the errorPage attribute is a relative URL.

The following directive displays MyErrorPage.jsp when all uncaught exceptions are thrown −

<%@ page errorPage = "MyErrorPage.jsp" %>

The isErrorPage attribute indicates that the current JSP can be used as the error page for another JSP.

The value of isErrorPage is either true or false. The default value of the isErrorPage attribute is false.

For example, the handleError.jsp sets the isErrorPage option to true because it is supposed to handle errors −

<%@ page isErrorPage = "true" %>
raja
Published on 20-Mar-2019 12:28:50
Advertisements