I use Spring MVC + Spring Security in my project. And I need get user entity after user authenticates and across his session. For example, in order to print his name on my welcome page like: Welcome, ${user.firstName}!
or get his list of companies on another page:
<c:forEach items="${user.userCompanies}" var="company">
${company.name}
</c:forEach>
etc. Could you help me to solve this issue?
Check the taglib provided by Spring Security.
To get the username, use: