1
0
mirror of synced 2026-08-05 17:57:15 +00:00

SEC-615: Automatically focus on login name HTML element on page load.

This commit is contained in:
Ben Alex
2007-12-03 06:34:43 +00:00
parent 7aa28ea742
commit cb765bc34b
2 changed files with 4 additions and 4 deletions
@@ -65,10 +65,10 @@ public class DefaultLoginPageGeneratingFilter extends SpringSecurityFilter {
}
}
return "<html><head><title>Login Page</title></head><body>\n" +
return "<html><head><title>Login Page</title></head><body onload='document.f.j_username.focus();'>\n" +
(loginError ? ("<font color='red'>Your login attempt was not successful, try again.<br/><br/>Reason: " +
errorMsg + "</font>") : "") +
" <form action='" + request.getContextPath() + authenticationUrl + "' method='POST'>\n" +
" <form name='f' action='" + request.getContextPath() + authenticationUrl + "' method='POST'>\n" +
" <table>\n" +
" <tr><td>User:</td><td><input type='text' name='" + usernameParameter + "' value='" + lastUser +
"'></td></tr>\n" +