How can I print the stack trace of an Exception out to my JSP page?
Created May 14, 2012
Byron Tymvios
To print a stack trace out to your JSP page, you need to wrap the implicit object 'out' in a printWriter and pass the object to the printStackTrace method in Exception. ie:
<% // JSP scriptlet
try{
// An Exception is thrown
}catch(Exception e){
e.printStacktrace(new java.io.PrintWriter(out));
}
%>