Spring Security rename login form form tags

I Spring The security login form is as follows

<form name='f' action='/j_spring_security_check' method='POST'> 
 <table> 
    <tr><td>User:</td><td><input type='text' name='j_username' value=''></td></tr> 
    <tr><td>Password:</td><td><input type='password' name='j_password'/></td></tr> 
    <tr><td colspan='2'><input name="submit" type="submit"/></td></tr> 
    <tr><td colspan='2'><input name="reset" type="reset"/></td></tr> 
  </table> 
</form>

I know how to change the action attribute in this form (using login-processing-url="/login") My question is how to change the j_username and j_password names to be username and password?

+5
source share
1 answer

There is an alternative way for your request:
Spring - Security: how are the login and password associated with the authentication provider? Spring Security 3 - How to configure username and password settings?

- Spring Security 3.1.0 ( - RC2, GA ), form-login:

<beans:beans>
  <http>
    <form-login username-parameter="username" password-parameter="password" />
  </http>
</beans:beans>
+10

All Articles