Java – why use J_ Username and spring_ SECURITY_ LAST_ Username variable?
•
Java
Why do things turn out like this?
<input type="text" name="j_username" value="${SPRING_Security_LAST_USERNAME}">
Not this?
<input type="text" name="username" value="">
j_ Username and spring_ Security_ LAST_ What is the value of the username variable?
Solution
j_ Username and j_ Password is a standardized name in the java servlet specification, so the application server (or servlet container) knows them and can perform container authentication independently of the application This allows, for example, single sign on to multiple webapps deployed in the same application server See the chapter "SRV 12.5.3 form based authentication" in jsr-154
Spring security constants are just for the convenience of users, so they don't need to re-enter the user name. If spring security recognizes them, it will automatically suggest the user name
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码