| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd"> |
| <!--NewPage--> |
| <HTML> |
| <HEAD> |
| <!-- Generated by javadoc on Fri Aug 22 03:44:10 EDT 2003 --> |
| <TITLE> |
| ExceptionHandler (Apache Struts API Documentation) |
| </TITLE> |
| <META NAME="keywords" CONTENT="org.apache.struts.action.ExceptionHandler,ExceptionHandler class"> |
| <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> |
| </HEAD> |
| <SCRIPT> |
| function asd() |
| { |
| parent.document.title="ExceptionHandler (Apache Struts API Documentation)"; |
| } |
| </SCRIPT> |
| <BODY BGCOLOR="white" onload="asd();"> |
| |
| <!-- ========== START OF NAVBAR ========== --> |
| <A NAME="navbar_top"><!-- --></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> |
| <TR> |
| <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_top_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ExceptionHandler.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../org/apache/struts/action/DynaActionFormClass.html"><B>PREV CLASS</B></A> |
| <A HREF="../../../../org/apache/struts/action/ForwardingActionForward.html"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> |
| <A HREF="ExceptionHandler.html" TARGET="_top"><B>NO FRAMES</B></A> |
| |
| <SCRIPT> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A> |
| </NOSCRIPT> |
| </FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <!-- =========== END OF NAVBAR =========== --> |
| |
| <HR> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <H2> |
| <FONT SIZE="-1"> |
| org.apache.struts.action</FONT> |
| <BR> |
| Class ExceptionHandler</H2> |
| <PRE> |
| java.lang.Object |
| | |
| +--<B>org.apache.struts.action.ExceptionHandler</B> |
| </PRE> |
| <HR> |
| <DL> |
| <DT>public class <B>ExceptionHandler</B><DT>extends java.lang.Object</DL> |
| |
| <P> |
| An ExceptionHandler is configured in the Struts configuration file to handle a specific |
| type of exception thrown by an Action's execute method. |
| <P> |
| |
| <P> |
| <DL> |
| <DT><B>Since:</B></DT> |
| <DD>Struts 1.1</DD> |
| </DL> |
| <HR> |
| |
| <P> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| |
| |
| <!-- =========== FIELD SUMMARY =========== --> |
| |
| |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| |
| <A NAME="constructor_summary"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=2><FONT SIZE="+2"> |
| <B>Constructor Summary</B></FONT></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/action/ExceptionHandler.html#ExceptionHandler()">ExceptionHandler</A></B>()</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| |
| <A NAME="method_summary"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=2><FONT SIZE="+2"> |
| <B>Method Summary</B></FONT></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/apache/struts/action/ActionForward.html">ActionForward</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/action/ExceptionHandler.html#execute(java.lang.Exception, org.apache.struts.config.ExceptionConfig, org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)">execute</A></B>(java.lang.Exception ex, |
| <A HREF="../../../../org/apache/struts/config/ExceptionConfig.html">ExceptionConfig</A> ae, |
| <A HREF="../../../../org/apache/struts/action/ActionMapping.html">ActionMapping</A> mapping, |
| <A HREF="../../../../org/apache/struts/action/ActionForm.html">ActionForm</A> formInstance, |
| javax.servlet.http.HttpServletRequest request, |
| javax.servlet.http.HttpServletResponse response)</CODE> |
| |
| <BR> |
| Handle the exception.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/action/ExceptionHandler.html#storeException(javax.servlet.http.HttpServletRequest, java.lang.String, org.apache.struts.action.ActionError, org.apache.struts.action.ActionForward, java.lang.String)">storeException</A></B>(javax.servlet.http.HttpServletRequest request, |
| java.lang.String property, |
| <A HREF="../../../../org/apache/struts/action/ActionError.html">ActionError</A> error, |
| <A HREF="../../../../org/apache/struts/action/ActionForward.html">ActionForward</A> forward, |
| java.lang.String scope)</CODE> |
| |
| <BR> |
| Default implementation for handling an <b>ActionError</b> generated |
| from an Exception during <b>Action</b> delegation.</TD> |
| </TR> |
| </TABLE> |
| <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TD><B>Methods inherited from class java.lang.Object</B></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> |
| </TR> |
| </TABLE> |
| |
| <P> |
| |
| <!-- ============ FIELD DETAIL =========== --> |
| |
| |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| |
| <A NAME="constructor_detail"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=1><FONT SIZE="+2"> |
| <B>Constructor Detail</B></FONT></TD> |
| </TR> |
| </TABLE> |
| |
| <A NAME="ExceptionHandler()"><!-- --></A><H3> |
| ExceptionHandler</H3> |
| <PRE> |
| public <B>ExceptionHandler</B>()</PRE> |
| <DL> |
| </DL> |
| |
| <!-- ============ METHOD DETAIL ========== --> |
| |
| <A NAME="method_detail"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=1><FONT SIZE="+2"> |
| <B>Method Detail</B></FONT></TD> |
| </TR> |
| </TABLE> |
| |
| <A NAME="execute(java.lang.Exception, org.apache.struts.config.ExceptionConfig, org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)"><!-- --></A><H3> |
| execute</H3> |
| <PRE> |
| public <A HREF="../../../../org/apache/struts/action/ActionForward.html">ActionForward</A> <B>execute</B>(java.lang.Exception ex, |
| <A HREF="../../../../org/apache/struts/config/ExceptionConfig.html">ExceptionConfig</A> ae, |
| <A HREF="../../../../org/apache/struts/action/ActionMapping.html">ActionMapping</A> mapping, |
| <A HREF="../../../../org/apache/struts/action/ActionForm.html">ActionForm</A> formInstance, |
| javax.servlet.http.HttpServletRequest request, |
| javax.servlet.http.HttpServletResponse response) |
| throws javax.servlet.ServletException</PRE> |
| <DL> |
| <DD>Handle the exception. |
| Return the <code>ActionForward</code> instance (if any) returned by |
| the called <code>ExceptionHandler</code>. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>ex</CODE> - The exception to handle<DD><CODE>ae</CODE> - The ExceptionConfig corresponding to the exception<DD><CODE>mapping</CODE> - The ActionMapping we are processing<DD><CODE>formInstance</CODE> - The ActionForm we are processing<DD><CODE>request</CODE> - The servlet request we are processing<DD><CODE>response</CODE> - The servlet response we are creating |
| <DT><B>Throws:</B> |
| <DD><CODE>javax.servlet.ServletException</CODE> - if a servlet exception occurs<DT><B>Since:</B></DT> |
| <DD>Struts 1.1</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="storeException(javax.servlet.http.HttpServletRequest, java.lang.String, org.apache.struts.action.ActionError, org.apache.struts.action.ActionForward, java.lang.String)"><!-- --></A><H3> |
| storeException</H3> |
| <PRE> |
| protected void <B>storeException</B>(javax.servlet.http.HttpServletRequest request, |
| java.lang.String property, |
| <A HREF="../../../../org/apache/struts/action/ActionError.html">ActionError</A> error, |
| <A HREF="../../../../org/apache/struts/action/ActionForward.html">ActionForward</A> forward, |
| java.lang.String scope)</PRE> |
| <DL> |
| <DD>Default implementation for handling an <b>ActionError</b> generated |
| from an Exception during <b>Action</b> delegation. The default |
| implementation is to set an attribute of the request or session, as |
| defined by the scope provided (the scope from the exception mapping). An |
| <b>ActionErrors</b> instance is created, the error is added to the collection |
| and the collection is set under the Globals.ERROR_KEY. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>request</CODE> - - The request we are handling<DD><CODE>property</CODE> - - The property name to use for this error<DD><CODE>error</CODE> - - The error generated from the exception mapping<DD><CODE>forward</CODE> - - The forward generated from the input path (from the form or exception mapping)<DD><CODE>scope</CODE> - - The scope of the exception mapping.</DL> |
| </DD> |
| </DL> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <HR> |
| |
| <!-- ========== START OF NAVBAR ========== --> |
| <A NAME="navbar_bottom"><!-- --></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> |
| <TR> |
| <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_bottom_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ExceptionHandler.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../org/apache/struts/action/DynaActionFormClass.html"><B>PREV CLASS</B></A> |
| <A HREF="../../../../org/apache/struts/action/ForwardingActionForward.html"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> |
| <A HREF="ExceptionHandler.html" TARGET="_top"><B>NO FRAMES</B></A> |
| |
| <SCRIPT> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A> |
| </NOSCRIPT> |
| </FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <!-- =========== END OF NAVBAR =========== --> |
| |
| <HR> |
| Copyright © 2000-2003 - Apache Software Foundation |
| </BODY> |
| </HTML> |