How does JSP handle run-time exceptions?

Answer Posted / guest

You can use the errorPage attribute of the page directive
to have uncaught runtime exceptions automatically forwarded
to an error processing page.
For example:
redirects the browser to the JSP page error.jsp if an
uncaught exception is encountered during request
processing. Within error.jsp, if you indicate that it is an
error-processing page, via the directive:
the Throwable object describing the exception may be
accessed within the error page via the exception implicit
object.
Note: You must always use a relative URL as the value for
the errorPage attribute.

Is This Answer Correct ?    10 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I override the jspinit() method within a jsp page?

674


How did you implement caching in jsp?

848


What is session tracking in jsp?

743


How does response sendredirect work?

715


Why do we need custom tags?

688


What is the full form of jsp?

722


What is full form of jsp?

683


What is content type in jsp?

668


What jsp lifecycle methods can I override?

782


Which tag should be used to pass information from jsp to include jsp?

705


Why is jsp used?

667


What is the requirement of a tag library?

697


Can we implement an interface in a jsp?

752


What is application scope in jsp?

696


Define jsp declaration?

748