私はSpringのセキュリティを学んでいrequest.getUserPrincipal()
ます.pageContext.request.userPrincipal.name
これは私のコードです(すべてが機能しています):
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page session="true"%>
<html>
<body>
<h5>Title : ${title}</h5>
<h5>Message : ${message}</h5>
<c:if test="${pageContext.request.userPrincipal.name != null}">
<h2>Hi User : ${pageContext.request.userPrincipal.name}></h2>
<br>
</c:if>
</body>
</html>
私の質問は次のとおりです。
1)。この名前はpageContext.request.userPrincipal.name
セッションから取得されていますか? <%@page session="true"%>
フォームの上部にあるので
2)。パスワードも取得できますか?pageContext.request.userPrincipal.password
フォームでパスワードを取得するにはどうすればよいですか?
スプリングの本を買うお金がないので、このフレームワークを理解するためにあなたの助けを本当に感謝しています.