-----Original Message-----
From: Yee, Richard K,,DMDCWEST
Sent: Wednesday, July 30, 2003 9:04 AM
To: 'A mailing list about Java Server Pages specification and reference'
Subject: RE: OUTPUTTING AN EXCEPTION


Try the printStackTrace(PrintWriter) method of the exception. Use the JSP
out predefined variable for the PrintWriter. If the exception occurs in
another JSP page, you can also use the errorPage directive to specify
another JSP page to display if an exception occurs in the current page. In
the error JSP page, you can then access the exception variable using <%=
exception %> and print the stack trace with <% exception.printStackTrace(new
PrintWriter(out)); %>
Note: there is a variable that is literally called 'exception'.

Regards,

Richard

-----Original Message-----
From: Tim Davidson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 30, 2003 8:04 AM
To: [EMAIL PROTECTED]
Subject: OUTPUTTING AN EXCEPTION


Hi,

 How do you output the stack trace of an exception to the JSP page?  I need
something like:
<%=((Throwable)request.getAttribute("javax.servlet.error.exception")).printS
tackTrace();%>

many thanks in advance.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set
JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set
JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to