|
|||||||||
Home >> All >> org >> apache >> struts >> [ action overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
org.apache.struts.action
Class ExceptionHandler

java.lang.Objectorg.apache.struts.action.ExceptionHandler
- public class ExceptionHandler
- extends java.lang.Object
An ExceptionHandler is configured in the Struts
configuration file to handle a specific type of exception thrown
by an Action.execute
method.
- Since:
- Struts 1.1
Field Summary | |
private static org.apache.commons.logging.Log |
log
Commons logging instance. |
private static org.apache.struts.util.MessageResources |
messages
The message resources for this package. |
Constructor Summary | |
ExceptionHandler()
|
Method Summary | |
ActionForward |
execute(java.lang.Exception ex,
org.apache.struts.config.ExceptionConfig ae,
ActionMapping mapping,
ActionForm formInstance,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handle the Exception . |
protected void |
logException(java.lang.Exception e)
Logs the Exception using commons-logging. |
protected void |
storeException(javax.servlet.http.HttpServletRequest request,
java.lang.String property,
ActionError error,
ActionForward forward,
java.lang.String scope)
Deprecated. Use storeException(HttpServletRequest, String, ActionMessage, ActionForward, String) instead. This will be removed after Struts 1.2. |
protected void |
storeException(javax.servlet.http.HttpServletRequest request,
java.lang.String property,
ActionMessage error,
ActionForward forward,
java.lang.String scope)
Default implementation for handling an ActionMessage generated
from an Exception during Action delegation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
log
private static final org.apache.commons.logging.Log log
Commons logging instance.
messages
private static org.apache.struts.util.MessageResources messages
The message resources for this package.
Constructor Detail |
ExceptionHandler
public ExceptionHandler()
Method Detail |
execute
public ActionForward execute(java.lang.Exception ex, org.apache.struts.config.ExceptionConfig ae, ActionMapping mapping, ActionForm formInstance, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException
Handle the
Exception
. Return theActionForward
instance (if any) returned by the calledExceptionHandler
.- Since:
- Struts 1.1
logException
protected void logException(java.lang.Exception e)
Logs the
Exception
using commons-logging.- Since:
- Struts 1.2
storeException
protected void storeException(javax.servlet.http.HttpServletRequest request, java.lang.String property, ActionError error, ActionForward forward, java.lang.String scope)
- Deprecated. Use storeException(HttpServletRequest, String, ActionMessage, ActionForward, String)
instead. This will be removed after Struts 1.2.
Default implementation for handling an
ActionError
generated from anException
duringAction
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). AnActionErrors
instance is created, the error is added to the collection and the collection is set under theGlobals.ERROR_KEY
.
storeException
protected void storeException(javax.servlet.http.HttpServletRequest request, java.lang.String property, ActionMessage error, ActionForward forward, java.lang.String scope)
Default implementation for handling an
ActionMessage
generated from anException
duringAction
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). AnActionMessages
instance is created, the error is added to the collection and the collection is set under theGlobals.ERROR_KEY
.- Since:
- Struts 1.2
|
|||||||||
Home >> All >> org >> apache >> struts >> [ action overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |