Why do this?
<input type="text" name="j_username" value="${SPRING_SECURITY_LAST_USERNAME}">
instead of this?
<input type="text" name="username" value="">
What’s the value of the j_username and SPRING_SECURITY_LAST_USERNAME variables?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
j_usernameandj_passwordare standardized names in the Java Servlet specification, so the application servers (or servlet containers) know about them and can perform container authentication, independently of the application. This allows for example single-sign on into multiple webapps deployed in the same application server. See chapter “SRV 12.5.3 Form Based Authentication” in JSR-154The Spring Security constant is just a convenience for users, so they don’t have to re-enter their username, if Spring Security recognizes them it automatically suggests the username.