ActionErrors actionErrors = null;
ArrayList errorList = new ArrayList();
doValidate(mapping, request, errorList);
request.setAttribute("errors", errorList);
if (!errorList.isEmpty()) {
actionErrors = new ActionErrors();
actionErrors.add(ActionErrors.GLOBAL_ERROR, new ActionError("global.error"));
}
return actionErrors;