if (isTokenValid(request)) {
// reset the token
resetToken(request);
// save data
}
else {
ActionMessages errors = new ActionMessages();
errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.token"));
saveErrors(request, errors);
return new ActionForward(mapping.getInputForward());
}
return mapping.findForward("success");