I am trying to redirect back to the login page when the authentication fails along with some error messages. I am wondering how do we pass some sort of parameters to /login in the security-context.xml saying that this is unauthenticated and then attach some error text ?
<security:form-login login-page="/login"
username-parameter="email"
password-parameter="password"
default-target-url="/member/"
authentication-failure-url="/login"/>
/login is actually a Controller for returning the ModelAndView.