How can get and show username, email, ip etc. of User which got below result in${pageContext.request.userPrincipal}
?
org.springframework.sec
You should use Spring Security JSP tags.
First declare the correct taglib:
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
and then use the following code to display for example the email of the current user.
<sec:authentication property="principal.email" />
You can substitute email for any property of your principal object (username, firstName, etc.).
More information about Spring Security JSP tags can be found in the documentation:
http://docs.spring.io/spring-security/site/docs/3.0.x/reference/taglibs.html