I am using Spring Security. I want to display login error message on login.jsp such as login failed or account locked. How can I display such message on login page
Just configure authentication-failure-url to a Servlet and set an attribute from that servlet like
request.setAttribute("errorMessage",putYourMessageHere);
and forward this request to login page.
Or provide
authentication-failure-url as login.jsp?authValid=false
check for the param on jsp
${param.authFailed}
and print the message conditionally