/** * Process the specified HTTP request for <strong>validate</strong> event. * * @param mapping The ActionMapping used to select this instance * @param form The optional ActionForm bean for this request (if any) * @param request The HTTP request we are processing * @param response The HTTP response we are creating * @exception Exception if an input/output error or servlet exception occurs */ public ActionForward validate( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { LOG.debug("Starting validate"); String returnCode = PAGE_SELF; CreateAccountForm createAccountForm = (CreateAccountForm) form; // Start of user code method validate User user = new User(); user.setLogin(createAccountForm.getLogin()); user.setPassword(createAccountForm.getPassword()); user.setFirstName(createAccountForm.getFirstName()); user.setLastName(createAccountForm.getLastName()); user.setEmail(createAccountForm.getEmail()); userService.createUser(user); returnCode = PAGE_LOGIN; // End of user code LOG.debug("End validate"); return mapping.findForward(returnCode); }