ErrorPage Attribute process any exceptions thrown but not caught in the current page - JSP

Q.  Which attribute specifies a JSP page that should process any exceptions thrown but not caught in the current page?
- Published on 19 Oct 15

a. The ErrorPage Attribute
b. The IsErrorPage Attribute
c. Both A & B
d. None of the above

ANSWER: The ErrorPage Attribute
 

    Discussion

  • Nirja Shah   -Posted on 14 Dec 15
    errorPage attribute
    - This attribute specifies a JSP page that should process any exceptions (i.e.,something of type Throwable) thrown but not caught in the current page. It is used as follows:
    < %@ page errorPage=”Relative URL”%>
    The exception thrown will automatically be available to the designed error page by means of the exception variable.

    IsErrorPage attribute
    - This attribute indicates whether or not the current page can act as the error page for another JSP page. Use of isErrorPage takes one of the following two forms:
    <% page isErrorPage=”true” %>
    <% page isErrorPage=”false” %> <% --- Default --- %>

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)