toggle login/logout link depending if the user is authenticated

This commit is contained in:
Scott Andrews
2008-04-11 23:16:29 +00:00
parent d4d379a366
commit 56c0683c3e

View File

@@ -26,9 +26,12 @@
<div id="welcome">
<div class="left">Spring Travel: A Spring Faces Reference Application</div>
<div class="right">
<c:if test="${currentUser.name != 'roleAnonymous'}">
<c:if test="${not empty currentUser.name}">
Welcome, ${currentUser.name} | <a href="${request.contextPath}/spring/logout">Logout</a>
</c:if>
<c:if test="${empty currentUser.name}">
<a href="${request.contextPath}/spring/login">Login</a>
</c:if>
</div>
</div>
<div id="branding" class="spring">