aspose file tools*
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
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "HFSJ Page 471:" Watch "HFSJ Page 471:" New topic
Author

HFSJ Page 471:

amarshi mohanty
Ranch Hand

Joined: Jul 01, 2008
Posts: 110
Hi,

page 471 says:

<%@ page isErrorPage=”true” %>
<html><body>
<strong>Bummer.</strong>

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


</body></html>

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?

thanks
Amarshi


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

Joined: Aug 03, 2008
Posts: 9313
    
  17

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: http://aspose.com/file-tools
 
subject: HFSJ Page 471: