📄 exceptionhandler.html
字号:
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><clinit>, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="log"><!-- --></A><H3>
log</H3>
<PRE>
private static final org.apache.commons.logging.Log <B>log</B></PRE>
<DL>
<DD><p>Commons logging instance.</p></DL>
<HR>
<A NAME="messages"><!-- --></A><H3>
messages</H3>
<PRE>
private static <A HREF="../../../../org/apache/struts/util/MessageResources.html">MessageResources</A> <B>messages</B></PRE>
<DL>
<DD><p>The message resources for this package.</p></DL>
<!-- ========= 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><p>Handle the <code>Exception</code>. Return the <code>ActionForward</code> instance (if any) returned by the called <code>ExceptionHandler</code>.<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><DD>Struts 1.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="logException(java.lang.Exception)"><!-- --></A><H3>
logException</H3>
<PRE>
protected void <B>logException</B>(java.lang.Exception e)</PRE>
<DL>
<DD><p>Logs the <code>Exception</code> using commons-logging.</p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>e</CODE> - The Exception to log.<DT><B>Since: </B><DD>Struts 1.2</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><B>Deprecated.</B> <I>Use storeException(HttpServletRequest, String, ActionMessage, ActionForward, String) instead. This will be removed after Struts 1.2.</I>
<P>
<DD><p>Default implementation for handling an <code>ActionError</code> generated from an <code>Exception</code> during <code>Action</code> 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 <code>ActionErrors</code> instance is created, the error is added to the collection and the collection is set under the <code>Globals.ERROR_KEY</code>.</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>
<HR>
<A NAME="storeException(javax.servlet.http.HttpServletRequest, java.lang.String, org.apache.struts.action.ActionMessage, 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/ActionMessage.html">ActionMessage</A> error, <A HREF="../../../../org/apache/struts/action/ActionForward.html">ActionForward</A> forward, java.lang.String scope)</PRE>
<DL>
<DD><p>Default implementation for handling an <code>ActionMessage</code> generated from an <code>Exception</code> during <code>Action</code> 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 <code>ActionMessages</code> instance is created, the error is added to the collection and the collection is set under the <code>Globals.ERROR_KEY</code>.</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.<DT><B>Since: </B><DD>Struts 1.2</DD>
</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=2 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></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
Copyright
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -