// Get the exception passed by JSP Exception e = (Exception)request.getAttribute("javax.servlet.jsp.jspException");