• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is the purpose for isErrorPage= true| false?

 
Varun Selva
Ranch Hand
Posts: 48
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 16
Java Mac
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Varun Selva
Ranch Hand
Posts: 48
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Durgesh Vaishnav!
I got the idea.
 
Varun Selva
Ranch Hand
Posts: 48
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
;
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic