FileDocCategorySizeDatePackage
SaveDataAction.javaAPI DocExample1009Wed Jun 30 13:40:38 BST 2004com.oreilly.strutsckbk.ch07

SaveDataAction

public class SaveDataAction extends org.apache.struts.action.Action

Fields Summary
Constructors Summary
Methods Summary
public org.apache.struts.action.ActionForwardexecute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)

		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");