Jsp Error Page Message
custom extensions and distributions ... Reply to this Reply to original Try a filter[ Go to top ] Posted by: johnny english Posted on: October 25 2011 14:30 EDT in response to Morten Frederiksen Hi Morten, In this example, I specified the exception-type as java.lang.Throwable so that all exceptions would be sent to the error.jsp page.
Jsp Error Page Example
Email This Home Web tier: servlets, JSP, Web frameworks: Best way to handle 404 - page not found error in a jsp. You can have following type of errors in your JSP code: Checked exceptions: Achecked exception is an exception that is typically a user error or a problem that cannot be foreseen it compiles and and in run time it's not calling sendError method in ErrorAwareRequestWrapper.java, due to which it's not displaying the error page. To set up an error page, use the <%@ page errorPage="xxx" %> directive. <%@ page errorPage="ShowError.jsp" %>
All Rights Reserved. Here is the exception stack trace: Using JSTL tags for Error Page: You can make use of JSTL tags to write an error page ShowError.jsp. If the error comes from a servlet the exception details are passed as request attributes javax.servlet.error.status_code java.lang.Integer javax.servlet.error.exception_type java.lang.Class javax.servlet.error.message java.lang.String javax.servlet.error.exception java.lang.Throwable javax.servlet.error.request_uri java.lang.String javax.servlet.error.servlet_name java.lang.String Check the Servlet Specification Exception Handling In Jsp Servlet Application As a consequence, the server, by default, gives a listing of all contexts running on the server.One of the quickest ways to avoid this behavior is to create a catch all
thanks for the help.Amit Sharma Reply to this Reply to original Thanks Sunbalan.....[ Go to top ] Posted by: Bhuvana Muruganandam Posted on: January 27 2005 12:00 EST in response to Jsp Error Page Status Code Anyhow, good luck on that one, and would be great to know the solution at the end. –Gennady Shumakher Jul 16 '09 at 14:17 1 @Lea Verou: It does work. There are 3 files: index.jsp for input values process.jsp for dividing the two numbers and displaying the result error.jsp for handling the exception index.jsp