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

What is an implicit object?

671


How can we disable el?

718


What is jsp taglib?

673


Is jsp front end or backend?

670


What are the two ways to include the result of another page?

2113


Why jsp is used in java?

661


Which syntax is used to comment jsp?

698


How can I override the jspinit() and jspdestroy() methods within a jsp page?

729


What is the difference between include and jsp directive: include action?

763


What is response sendredirect?

677


What is request scope in jsp?

739


Can we use jstl in html?

656


Which tags are used for bean development?

678


What is _jspservice method?

723


How are the jsp requests handled?

705