You would need to override the requiresAuthentication method to return true when an http parameter is present and matches the URL:
Code:
protected boolean requiresAuthentication(HttpServletRequest request, HttpServletResponse response) {
return request.getParameter("login") != null &&
super.requiresAuthentication(request,response);
}
Then your controller could act upon the same URL when the parameter registration is non null.
Code:
@RequestMapping(value="/j_spring_security_login",params="registration")
public String register(...) {
...
}
Your HTML would then look something like this:
Code:
<form action="<c:url value="/j_spring_security_check"/>" method="POST">
...
<input type="submit" name="login" value="Login"/>
<input type="submit" name="registration" value="Registration"/>
</form>