I want to show content to any user that is logged in and to hide if they are not logged in. I\'m using jsp\'s and spring security.
Obviously a home grown solution i
How 'bout this? - Spring 2.5 compliant ;-)
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
<security:authorize ifAllGranted="ROLE_USER">
Welcome <%= request.getUserPrincipal().getName() %>
<a href="<c:url value="/j_spring_security_logout"/>">Logout</a><br/>
</security:authorize>
you can use this inside jsp spring security tag
request.getUserPrincipal().getName()