File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes HFSJ Page 471: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "HFSJ Page 471:" Watch "HFSJ Page 471:" New topic

HFSJ Page 471:

amarshi mohanty
Ranch Hand

Joined: Jul 01, 2008
Posts: 110

page 471 says:

<%@ page isErrorPage=”true” %>

You caused a ${pageContext.exception} on the server.


and then is explainns:
"Note: the exception implicit object is available ONLY to error pages with an explicitly-defined page directive:
<%@ page isErrorPage=”true” %>
In other words, configuring an error page in the DD is not enough to make the Container give that page the implicit exception object ".

I am not getting how Container gives the "exception " object?


SCJP (97%), SCWCD (95%))
Ankit Garg

Joined: Aug 03, 2008
Posts: 9466

amarshi when you post HTML in your message, check the "Disable HTML in this message" checkbox so that your post doesn't get screwed up.

When you set the isErrorPage="true", then the container created a scripting variable called exception in the generated servlet of the JSP page. If you don't specify the isErrorPage="true", you can still use the exception object using EL (as in your code) or pageContext scripting variable...

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
amarshi mohanty
Ranch Hand

Joined: Jul 01, 2008
Posts: 110
Thank Ankit..
I agree. Here's the link:
subject: HFSJ Page 471:
jQuery in Action, 3rd edition