This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes What is the purpose for isErrorPage= true| false? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "What is the purpose for isErrorPage= true| false?" Watch "What is the purpose for isErrorPage= true| false?" New topic
Author

What is the purpose for isErrorPage= true| false?

Varun Selvanathan
Greenhorn

Joined: Jun 17, 2012
Posts: 10

What is the purpose for isErrorPage= true| false?
I know that the exception object will work only when isErrorPage= true.

Scriptlet <%= exception %> is working if the isErrorPage attribute set as true.
But EL {pagecontext.exception} will work whether true or false.

WHY???
Durgesh Vaishnav
Greenhorn

Joined: Oct 06, 2006
Posts: 16

Implicit objects in jsp are the objects that are created by the container automatically and the container makes them available to the developers. Exception object has a page scope and this object allows the exception data to be accessed only by designated JSP "error pages. When a JSP page has been declared an errorPage=true, it is made available this object with name of "exception" of type java.lang.Throwable.

in your case, you cann't access exception like {exception}. but it is available via pagecontext.


Enthusiasm is the engine of success!!
SCJP 1.4, OCPJP6
Varun Selvanathan
Greenhorn

Joined: Jun 17, 2012
Posts: 10

Thanks Durgesh Vaishnav!
I got the idea.
Varun Selvanathan
Greenhorn

Joined: Jun 17, 2012
Posts: 10

;
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: What is the purpose for isErrorPage= true| false?
 
Similar Threads
problem with errorPage and isErrorPage="true"
Request Dispatcher Behaviour
Error Page Handling
printing exception object through jsp expressions.
How to determine page type