I am able to use a custom login page with Spring Security 3.2.4, but after migrating with the code below using 4.0.0, I see a generic login form instead of my custom one:
<beans:bean id="authSuccessHandler" class="com.company.web.RoleBasedAuthenticationSuccessHandler" />
<http disable-url-rewriting="false" use-expressions="true">
<form-login login-page="/login"
username-parameter="j_username"
password-parameter="j_password"
login-processing-url="/j_spring_security_check"
authentication-failure-url="/login?login_error=true"
authentication-success-handler-ref="authSuccessHandler"/>
<!-- SOME INTERCEPT-URLs (redacted) -->
<intercept-url pattern="/login" access="permitAll"/>
<remember-me
remember-me-parameter="_spring_security_remember_me"
remember-me-cookie="SPRING_SECURITY_REMEMBER_ME_COOKIE"/>
<logout
logout-url="/j_spring_security_logout"
logout-success-url="/index" />
</http>
I also tried enabling debug logging on the various Spring classes. I set it on my custom authSuccessHandler, but I don't see any output from it. No luck with searching on SO or Google either.
Is there anything incompatible about this configuration?
Update:
I'm also using Apache Tiles as so:
<definition name="login" extends="scrollableLayout">
<put-attribute name="header" value="/WEB-INF/jsp/heading_blue.jsp"/>
<put-attribute name="body" value="/WEB-INF/jsp/login.jsp"/>
</definition>
And using the following:
<mvc:view-controller path="/login" />
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…