@RequestMapping(value = "/register.action", method = RequestMethod.POST)
    public @ResponseBody
    Map<String, Object> registerUser(HttpServletRequest request,
                                     @RequestParam String email,
                                     @RequestParam String password) {

        try {
            // build the user object that will be passed to the service method
            E user = getEntityClass().newInstance();

            user.setEmail(email);
            user.setAccountName(email);
            user.setPassword(password);
            user.setActive(false);

            user = service.registerUser(user, request);

            return ResultSet.success("You have been registered. "
                + "Please check your mails (" + user.getEmail()
                + ") for further instructions.");
        } catch (Exception e) {
            LOG.error("Could not register a new user: " + e.getMessage());
            return ResultSet.error("Could not register a new user.");
        }
    }
@ RequestMapping ( value = "/register.action" , method = RequestMethod . POST ) public @ ResponseBody Map < String , Object > registerUser ( HttpServletRequest request , @ RequestParam String email , @ RequestParam String password ) { try { E user = getEntityClass ( ) . newInstance ( ) ; user . setEmail ( email ) ; user . setAccountName ( email ) ; user . setPassword ( password ) ; user . setActive ( false ) ; user = service . registerUser ( user , request ) ; return ResultSet . success ( "You have been registered. " + "Please check your mails (" + user . getEmail ( ) + ") for further instructions." ) ; } catch ( Exception e ) { LOG . error ( "Could not register a new user: " + e . getMessage ( ) ) ; return ResultSet . error ( "Could not register a new user." ) ; } }
@param email
@param password