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