Thursday, August 12, 2010

jsf, spring security and jstl




The following code get session spring security context and show log in name.

<--c:forEach items='${sessionScope}' var='p'>
<--ul>
<--li>Parameter Name: <--h:outputtext value="'${p.key}'/"><--/li>
<--li>Parameter Value: <--h:outputtext value="'${p.value}'/"><--/li>
<--/ul>
<--/c:forEach>
You logged in as <--h:outputtext value="${sessionScope.SPRING_SECURITY_CONTEXT.authentication.principal.username}">

-->