my dog learned polymorphism*
The moose likes Servlets and the fly likes How get exception that sent them to jsp page? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How get exception that sent them to jsp page?" Watch "How get exception that sent them to jsp page?" New topic
Author

How get exception that sent them to jsp page?

Robert Paris
Ranch Hand

Joined: Jul 28, 2002
Posts: 585
I set a JSP page as an error-page, so certain exceptions will send you to that page. How do I get that exception?
Mark Howard
Ranch Hand

Joined: Feb 14, 2001
Posts: 285
Robert
An implicit variable called exception is made available to a JSP page which has an explicit page directive to indicate that it is an error-page handler:

You can see the actual Java declaration of this exception variable (which is of type Throwable) if you look at the generated _jspService() method.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

In case you haven't seen it, the JSP Syntax card is most useful. It is available from java.sun.com
One of things I always have it on the wall in front of me. (I mention it now because I always have to go looking for the implicit objects and tag syntax)
Dave
Robert Paris
Ranch Hand

Joined: Jul 28, 2002
Posts: 585
Great Link! I've been looking everywhere for that stuff!
 
wood burning stoves
 
subject: How get exception that sent them to jsp page?
 
Similar Threads
pagenation in jsp and java
Help: precompile jsp with jspc
Its urgent
array list into jsp page
Exception in Bean creation