What is isErrorPage attribute in JSP?


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" %>

karthikeya Boyini
karthikeya Boyini

I love programming (: That's all I know

Updated on: 30-Jul-2019

909 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements