The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Page directive's errorPage... Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "Page directive Watch "Page directive New topic
Author

Page directive's errorPage...

Poonam Akash
Ranch Hand

Joined: Jul 26, 2001
Posts: 100
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.


Poonam Akash,<br />Sun Certified Java Programmer,<br />Sun Certified Web Component Developer.<br />Good luck may be an opportunity that keep the door open,BUT hardwork always keeps the door open!!
ersin eser
Ranch Hand

Joined: Feb 22, 2001
Posts: 1072
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

Joined: Jun 03, 2000
Posts: 5040
on that jsp page...
the error page (JSP) that is declared using the relative URL.
Just clarifying...
- satya


Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
 
 
subject: Page directive's errorPage...
 
Threads others viewed
doubt error-page attribute of page directive
Can someone help me in this whether is this possible ?
HTTP Status 404 - /Ch03/
How to determine page type
error page
IntelliJ Java IDE