spring_security_check를 사용하여 로그인 페이지를 만들었습니다. 여기
:
j_username에 spring_security_check를 사용하여 액세스 할 수 없습니다.
<form name='f' action="/sec_test/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"
value="submit" />
</td>
</tr>
<tr>
<td colspan='2'><input name="reset" type="reset" />
</td>
</tr>
</table>
</form>
하지만 이후 j_username에 액세스 할 수 없습니다.
나는 시도했다 :
* request.getParameter ("j_username")
* request.getAttribute ("j_username")
* request.getAttribute ("j_username")
* request.getUserPrincipal() .getName()
* request.getRemoteUser()
모두에서 내가 얻는 것은 null입니다!
어떻게해야할까요?
내가 session.getAttribute ("SPRING_SECURITY_LAST_USERNAME") 아직도 내가 널지고있어 사용했던 것을 추가해야합니다. –