CustomExceptionHandlerpublic class CustomExceptionHandler extends org.apache.struts.action.ExceptionHandler
Methods Summary |
---|
public org.apache.struts.action.ActionForward | execute(java.lang.Exception ex, org.apache.struts.config.ExceptionConfig ae, org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm formInstance, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
// TODO Add custom code here to completely control handling
return super.execute(ex, ae, mapping, formInstance, request, response);
| protected void | logException(java.lang.Exception e)
// TODO Add custom code here for exception logging
System.out.println("Customized logException for:"+e);
super.logException(e);
| private void | saveMessage(java.lang.String msg)
// store error message in database ...
| protected void | storeException(javax.servlet.http.HttpServletRequest request, java.lang.String property, org.apache.struts.action.ActionMessage error, org.apache.struts.action.ActionForward forward, java.lang.String scope)
MessageResources msgRes = MessageResources.getMessageResources("ApplicationResources");
String msg = msgRes.getMessage(error.getKey());
saveMessage(msg);
super.storeException(request, property, error, forward, scope);
|
|