• Post Reply Bookmark Topic Watch Topic
  • New Topic

Page directive's errorPage...

 
Poonam Akash
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can anyone explain following lines with any good example.
Page directive "errorPage" defines a URL to a resource whixh will catch the exception.Here
If the URL names another JSP page then, when invoked that JSP page's exception implicit script variable shall contain a reference to the originating uncaught Throwable."
Thanx in advance for any help.
 
ersin eser
Ranch Hand
Posts: 1072
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
on that jsp page the implicit exception object will be an instance of the java.lang.Throwable class corresponding to the uncaught error that caused control to be transferred to this error page. So You can use the methods of Throwable class to do whatever you want to do with that exception object
Ie: fillInStackTrace(), getLocalizedMessage(), getMessage(), printStackTrace(), printStackTrace(PrintStream), printStackTrace(PrintWriter), toString()
[ January 24, 2002: Message edited by: ersin eser ]
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
on that jsp page...
the error page (JSP) that is declared using the relative URL.
Just clarifying...
- satya
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!