model.addAttribute("error",ErrorMessages.USERLOGINERROR);
is not working while using redirect
return "redirect:/userlogin";
I have google it but not found approciate answer
if(name.equals("false")){
System.out.println(ErrorMessages.USERLOGINERROR);
model.addAttribute("error",ErrorMessages.USERLOGINERROR);
return "redirect:/getuserloginpage";
}
JSP:
<form:form action="userlogin" method="post" commandname="login">
<div align="center" style="color: red">${error}</div>
<div align="center" style="color: red">${thanks}</div>
...
expected result should be :
Please check your email or password. actual results : printed nothing. (no error or exception found)