English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2 answers

catch(Exception e)
{
e.printStackTrace();
"handling code"
}

2006-07-16 14:49:28 · answer #1 · answered by Anonymous · 0 0

Vamshi will this help

errorPage="/WEB-INF/templates/errorPage.jsp"%>

<%-- some JSP content --%>

If you don't want to repeat this for each JSP page, use Tiles template or specify error page in "web.xml" file:




java.lang.Throwable
/WEB-INF/templates/errorPage.jsp

...



<%-- /WEB-INF/templates/errorPage.jsp --%>

<%@ page isErrorPage="true" %>

<%
out.println("Exception: " + exception);

%>

By using "isErrorPage" attribute you declare this JSP page as error page. As a result, you have access to "exception" JSP variable (in addition to regular "application", "session",

"request", etc.).

2006-07-16 22:16:41 · answer #2 · answered by Joe_Young 6 · 0 0

fedest.com, questions and answers