Exceptions you do not catch in the JSP page will result in forwarding of the request and uncaught exception to an error page. Methods of handling exceptions: We can handle exceptions using the below two methods. Author: Deron Eriksson Description: This Java tutorial describes how to create a JSP error page to handle exceptions. Using JSP Error Pages Any runtime error encountered during execution of a JSP page is handled using the standard Java exception mechanism in one of two ways: You can catch and http://btcherb.com/jsp-error/jsp-error-page-example-web-xml.php
If you want to handle all the exception, you will have to specify the java.lang.Exception in the exception-type element. If I try to hit a resource that does not exist in my web application, I'll see the error page, as expected. (Continued on page 2)Page: 1 2> Related Tutorials: The element at index 0 represents the top of the call stack, and the last element in the array represents the method at the bottom of the call stack. 6public Throwable The isErrorPage="true" indicates that this is an error page.
OracleJSP behavior will be modified appropriately in a future release. This shows the difference between JSP "include" and "forward" functionality--with a "forward", the output from the "forward-to" page replaces the output from the "forward-from" page. Error: java.lang.RuntimeException: Error condition!!!
Below is the error message: <%= exception %>