How can I get to print the stacktrace for an exception occuring within my JSP page?
However, you cannot print the stacktrace using the JSP out implicit variable, which is of type JspWriter. You will have to use a PrintWriter object instead. The following snippet demonstrates how you can print a stacktrace from within a JSP error page:
<%@ page isErrorPage="true" %> <% out.println("<pre>"); PrintWriter pw = response.getWriter(); exception.printStackTrace(pw); out.println("</pre>"); %>