on 12/21/99 4:04 PM, John McDonald <[EMAIL PROTECTED]> wrote:
> However, if I use Exception.printStackTrace( ), I get a VERY descriptive
> exception, but I can't seem to create a String from this exception.
>
> Anyone have any ideas?
#1. Don't send html email
#2. It is simple to use printStackTrace() the way that you want:
ByteArrayOutputStream ostr = new ByteArrayOutputStream();
e.printStackTrace(new PrintWriter(ostr,true));
String stackTrace = ostr.toString();
If you look at the source code to Turbine, you can see how this is done
quite easily. On top of it, Turbine allows you to easily catch ALL your
errors in one location instead of having to copy/paste this code (or code
that executes this code) into each and every servlet that you have.
<http://java.apache.org/turbine/>
-jon
--
Come to the first official Apache Software Foundation
Conference! <http://ApacheCon.Com/>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html