Hello Yong,

Saturday, January 12, 2002, 8:53:27 AM, you wrote:

YCK> Hello there,

YCK> Putting the line below gave me the exception message
YCK> <%= exception.getMessage() %>

YCK> I want to get the printStackTrace of exceptions in JSP.

YCK> I read that there is a method for printStackTrace which
YCK> accepts an output object. I figure that implicit "out"
YCK> object in JSP for this.

YCK> However trying the line below gave me a JSP compilation error.

YCK> <%= exception.printStackTrace(out) %>

YCK> Any ideas on where I made a mistake.

You should have written

<% exception.printStackTrace(out) %>

(note that there's no '=' char there. use <%= when you return some
value from your expression and <% when you just want to do something.
I guess <%= exception.printStackTrace(out) %> gets translated into
something like

out.write( exception.printStackTrace(out) );

which wasn't your intention.

Depending on your servlet container you may find and may not the
generated .java code for your pages. Tomcat keeps them.
Weblogic deletes them.
If you can find the .java for your .jsp you'll probably
have more luck in catching errors like this.)

Good luck!
--
Best regards,
 Anton Tagunov                            mailto:[EMAIL PROTECTED]

===========================================================================
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