| 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
|
|
;
|
 |
 |
|
|
subject: What is the purpose for isErrorPage= true| false?
|
|
|