aspose file tools*
The moose likes Servlets and the fly likes servlet call jsp error page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet call jsp error page" Watch "servlet call jsp error page" New topic
Author

servlet call jsp error page

suman deb
Ranch Hand

Joined: Jul 14, 2005
Posts: 54
hi all,

How can a Servlet call a JSP error page ?

(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.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Suman,

A Javaranch Tip:
Whenever someone post a series of questions like this (especially multiple choice questions) most people (myself included) assume that they have been cut and pasted from a homework assignment.

I seem to recall a list of questions that looked exactly like that in the not too distant past.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: servlet call jsp error page