I am using Spring MVC and Spring Security version 3.0.6.RELEASE. What is the easiest way to get the user name in my JSP? Or even just whether or not the user is logged in? I
I was using Maven so I had to add the taglibs library adding this to the pom.xml
org.springframework.security
spring-security-taglibs
3.1.3.RELEASE
Then in my jsp added:
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
And:
principal.username kept giving me errors (maybe is the way I created the UsernamePasswordAuthenticationToken object, not sure).