if (!(ex instanceof ErrorCodeException)) {
return super.execute(ex, ae, mapping, formInstance, request, response);
}
ErrorCodeException errCodeEx =(ErrorCodeException) ex;
ActionForward forward = null;
ActionMessage error = null;
String property = null;
// Build the forward from the exception mapping if it exists
// or from the form input
if (ae.getPath() != null) {
forward = new ActionForward(ae.getPath());
} else {
forward = mapping.getInputForward();
}
ErrorCodeException ece =(ErrorCodeException) ex;
String code = Integer.toString(ece.getCode());
error = new ActionMessage(code, ece.getArgs());
property = error.getKey();
logException(ex);
// Store the exception
request.setAttribute(Globals.EXCEPTION_KEY, ex);
storeException(request, property, error, forward, ae.getScope());
return forward;