File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes How to get exception object on error page with EL? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "How to get exception object on error page with EL?" Watch "How to get exception object on error page with EL?" New topic
Author

How to get exception object on error page with EL?

Kelly Wood
Ranch Hand

Joined: Nov 07, 2004
Posts: 53
What is the proper way to get the exception object using EL on an error page? I have tried ${pageContext.exception} but it returns null (<%= exception %> works on the same page).
Ashley Bideau
Ranch Hand

Joined: Apr 22, 2006
Posts: 40
exception implicit object is available ONLY to error pages with an explicitly defined page directive attribute isErrorPage=true

Just configuring error page in DD is not enough to make the Container give that page implicit exception object. The below should work



-Ashley
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to get exception object on error page with EL?
 
Similar Threads
using ${exception.message}
printing exception object through jsp expressions.
Page 461
How to show the actual Exception occured during JSP Excution in Error Pages using JSP
exception implicit object even though page directive is not present