I have set my error page like this in web.xml:
java.lang.Exception /erro
Thrown Exception object is available as request attribute with name 'javax.servlet.error.exception'. So, in your JSP, you can write:
<% request.getAttribute("javax.servlet.error.exception").printStackTrace(new java.io.PrintWriter(out); %>