@Override
public ActionForward execute(Exception exception, ExceptionConfig arg1, ActionMapping mapping, ActionForm arg3, HttpServletRequest req, HttpServletResponse arg5) throws ServletException {
String userName = req.getUserPrincipal() == null ? "`ANONYMOUS USER`" : req.getUserPrincipal().getName().toLowerCase();
correctStrutsLocale(req);
BugException e = (BugException) exception;
e.generalLog(userName);
String message = e.getUserMessage();
req.setAttribute("userMessage",message); // may be null => page has to prepare a default
return mapping.findForward("bugErrorPage");
}
}