catch « Error « JSP-Servlet Q&A





1. Catching an error... faster    coderanch.com

On my web page I have a login screen where they're actually logging into the Oracle db (using an Oracle login- just as they would when logging directly into Oracle from SQL*Plus or something). I had the following... (more or less) String logUser = request.getParameter( "logUser" ); String logPass = request.getParameter( "logPass" ); try { // Load the Oracle JDBC driver ...

2. About catching error    coderanch.com

3. How to catch errors inJSP    coderanch.com

Three ways to catch errors: To redirect to an error page: 1. declare one jsp as being the error page: <%@ page isErrorPage="true" %> 2. declare the error-risky page as having an error page : <%@ page errorPage="error.jsp" %> Where error.jsp is the name of the first jsp (in 1.) Yet another way to redirect, but works for the whole web ...