Friday, 7 September 2012

How can a Servlet call a JSP error page ? | JAVA JSP

A. This capability is not supported.
B. When the servlet throws the exception, it will automatically be caught by the calling JSP page.
C. The servlet needs to forward the request to the specific error page URL. The exception is passed along as an attribute named "javax.servlet.jsp.jspException".
D. The servlet needs to redirect the response to the specific error page, saving the exception off in a cookie.

ANS: C.


No comments: