if (isTokenValid(request)) {
// reset the token
resetToken(request);
// save data
BusinessService.saveData();
}
else {
ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("Invalid token"));
saveErrors(request, errors);
return new ActionForward(mapping.getInput());
}
return mapping.findForward("success");