Try something like this:

import java.io.PrintWriter;
import java.io.StringWriter;

public class ExceptionUtility {

  public static String stackTrace (Throwable t) {
    StringWriter str = new StringWriter();
    t.printStackTrace(new PrintWriter(str));
    return str.toString();
  }

}

(*Chris*)

----- Original Message -----
From: "Gerald Reed" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 04, 2002 11:48 AM
Subject: [JSP-INTEREST] display the message in Expcetion.printStackTrace( )
in a JSP page?


> Hi there,
>
> What is the easiest way to display the message in
> Expcetion.printStackTrace( ) from a backend Java bean
> or java object onto a JSP page from which the Java
> object is called? Thanks in advance.
>
> -G
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - sign up for Fantasy Baseball
> http://sports.yahoo.com
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to