I am using spring security and i am wondering how to change the default login form.
I have set up the following configuration:
<http auto-config="true" use-expressions="false">
<form-login login-processing-url="/static/j_spring_security_check"
login-page="/login"
authentication-failure-url="/login?login_error=t"/>
<intercept-url pattern="/**"
access="ROLE_ADMIN" />
</http>
In the controller I have the following:
@Controller
@RequestMapping("login")
public class Logincontroller {
/**
* the logger used for print useful information
*/
protected final Log logger = LogFactory.getLog(getClass());
@RequestMapping(value="",method=RequestMethod.GET)
public String showLoginView(Map<String, Object> model) {
return WebappConstants.HOME_VIEW;
}
}
However when I click a url in the browser it says The page isn’t redirecting properly (Firefox). I have checked firebug and have turn on the debugger in order to effectively check that this code is not making a call to my controller.
Am I doing somehting wrong?
You denied access to the login page itself, you need to add a rule to allow it: