<form-login login-page="/login" authentication-failure-url="/login?error=credentials" default-target-url="/account" login-processing-url="/security_check"/>
那我该怎么做呢?
<!-- redirect url for failure of authentication --> <bean id="simpleUrlAuthenticationFailureHandler" class="org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler"> <constructor-arg value="/login.jsp?error=1"></constructor-arg> </bean>
我建议您从上下文访问对象并重置url,或者编写您自己的自定义处理程序,这些处理程序可能会执行特定于您所在页面的操作
http://static.springsource.org/spring-security/site/apidocs/org/springframework/security/web/authentication/SimpleUrlAuthenticationFailureHandler.html