IBM PORTAL: USING PUMA SPI TO DISPLAY AN LDAP ATTRIBUTE IN THE THEME

This is a sample code snippet inserted in the Default.jsp:

<c:if test="${ifLoggedIn}"><li class="lotusFirst">    
<% 
     com.ibm.portal.puma.User portalUser= (com.ibm.portal.puma.User)request.getAttribute(com.ibm.portal.RequestConstants.REQUEST_USER_OBJECT);
     String user = portalUser.get("displayName").toString();            
%>
 <span class="lotusUser">Hello&nbsp;<%=user%></span></li>
</c:if>

Comments

Popular posts from this blog

Ant Example: Check if a directory is empty or if specific file exists.

Django (1.2.3) CRUD Using Generic Views

Creating a Custom WebSphere Portal 8 Theme with the Eclipse IDE