I have set my error page like this in web.xml:
java.lang.Exception
/erro
May be it helps to you..
it will be show exception StackTrace into browser
exception.printStackTrace(response.getWriter());
Or
<%
try{
int test = Integer.parseInt("hola");
}catch(Exception e){
**// HERE THE MAGIC BEGINS!!**
out.println("");
e.printStackTrace(new java.io.PrintWriter(out));
out.println("");
**// THE MAGIC ENDS!!**
}
%>
If you declare <% page isErrorPage="true" %>
in top of error.jsp, then you have access to the thrown Exception (and thus also all of its getters) by ${exception}
Message: ${exception.message}
see more.. Mapping Errors to Error Screens