How to get User Object details in JSP page? Below code works fine in Spring Framework 3 but gives error in Spring 4.
Code Block
<span class="header-label">${pageContext.request.userPrincipal.principal.firstName} ${pageContext.request.userPrincipal.principal.lastName}</span>
Error given in Spring 4 (Eclipse IDE) although works fine when deployed
Multiple annotations found at this line:
- The method getPrincipal() is undefined for the type
Principal
- javax.servlet.jsp.PageContext cannot be resolved to a
type
- javax.servlet.jsp.JspException cannot be resolved to a
type