|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.struts.action.ExceptionHandler
jp.terasoluna.fw.web.struts.action.DefaultExceptionHandler
jp.terasoluna.fw.web.struts.action.SystemExceptionHandler
public class SystemExceptionHandler
Exception process handler exclusively for SystemException.
When the system exception occurs, outputs the log and navigates to error screen.
If the system exeception occurs while the action is being executed, error information is output and
navigated to the system error screen which is defined in the action mapping.
To use this function, specify the SystemExceptionHandler as the class of
global exception or action level exception handler in Struts configuration file (struts-config.xml).
When the global exception and action level exception are in conflict, action level exception is given the priority over the
global exception as per the Struts specifications.
When the replacement string is specified in SystemException, it is embedded in the error message.
When forward path is not specified in "path" attribute of <exception> element, "input" attribute of action mapping is considered as the forward resource.
Occurred exception instance is stored in request with the PageContext.EXCEPTION key. Thus, in JSP, it can be fetched as the implicit exception object.
SystemException
,
ExceptionConfigEx
,
DefaultExceptionHandler
,
PageContext
Field Summary | |
---|---|
private static org.apache.commons.logging.Log |
log
Log class. |
Fields inherited from class jp.terasoluna.fw.web.struts.action.DefaultExceptionHandler |
---|
LOG_LEVEL_DEBUG, LOG_LEVEL_ERROR, LOG_LEVEL_FATAL, LOG_LEVEL_INFO, LOG_LEVEL_TRACE, LOG_LEVEL_WARN |
Constructor Summary | |
---|---|
SystemExceptionHandler()
|
Method Summary | |
---|---|
org.apache.struts.action.ActionForward |
execute(java.lang.Exception ex,
org.apache.struts.config.ExceptionConfig eConfig,
org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionForm formInstance,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Entry point of SystemException exception handler. |
private java.lang.String |
getErrorMessage(javax.servlet.http.HttpServletRequest req,
jp.terasoluna.fw.exception.SystemException se,
org.apache.struts.util.MessageResources resources)
Fetches the error mesage by specifying the message key for message resource. |
protected org.apache.commons.logging.Log |
getLogger()
Fetches the logger of handler. |
Methods inherited from class jp.terasoluna.fw.web.struts.action.DefaultExceptionHandler |
---|
logException, logException, logException, logException |
Methods inherited from class org.apache.struts.action.ExceptionHandler |
---|
storeException, storeException |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static org.apache.commons.logging.Log log
Constructor Detail |
---|
public SystemExceptionHandler()
Method Detail |
---|
public org.apache.struts.action.ActionForward execute(java.lang.Exception ex, org.apache.struts.config.ExceptionConfig eConfig, org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm formInstance, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException
execute
in class DefaultExceptionHandler
ex
- ExceptioneConfig
- Exception configurationmapping
- Action mappingformInstance
- Action formrequest
- HTTP requestresponse
- HTTP response
javax.servlet.ServletException
- Servlet exceptionDefaultExceptionHandler.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
)
private java.lang.String getErrorMessage(javax.servlet.http.HttpServletRequest req, jp.terasoluna.fw.exception.SystemException se, org.apache.struts.util.MessageResources resources)
req
- HTTP requestse
- SystemExceptionresources
- Message resource
protected org.apache.commons.logging.Log getLogger()
getLogger
in class DefaultExceptionHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |