I can’t use httpsession java web 7 spring mvc 4

Asked

Viewed 8 times

0

When I try to use the httpSession have

     @RequestMapping(value = "efectuarLogin", method = RequestMethod.POST)
        public String efectuarLogin(@RequestParam("usuario") String usuario, @RequestParam("senha") String senha, ModelMap model, HttpSession session) {

            LoginDao loginDao = new LoginDao();

            LoginModelo login = new LoginModelo();

            login.setUsuario(usuario);
            login.setSenha(senha);
            loginDao.getUser(login);

            
            if (login.isExiste()) {
                model.addAttribute("usu", login);
                session.setAttribute("usuaio", login);
                //model.put("use",login);
                return "home";
            } else {
                return "login";
            }

        }
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.