ada*_*510 3 java jsp spring-mvc spring-security
好的,这应该是一个简单的
在header.jspx文件中,我希望有一个链接,将经过身份验证的用户引导到他们的用户页面.
这是我用来检索用户名的:
<sec:authentication property="principal.username" />
Run Code Online (Sandbox Code Playgroud)
这就是我想要的内容:
<a href="http://localhost:8080/dealclick/users/username_here" > My account </a>
Run Code Online (Sandbox Code Playgroud)
有可能吗?
你有没有尝试过
<c:set var="username">
<sec:authentication property="principal.username" />
</c:set>
Run Code Online (Sandbox Code Playgroud)
然后使用
<a href="http://localhost:8080/dealclick/users/${username}" > My account </a>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4376 次 |
| 最近记录: |