[jboss-user] [JBoss Portal] - Re: struggling to get user family name and role into jsp fil

apemberton do-not-reply at jboss.com
Thu Mar 19 08:17:23 EDT 2009


What version of JBoss Portal are you using? In Portal 2.6, your PageCustomizerInterceptor stores the userProfile as a request attribute:

Controller controller = controllerCtx.getController();
  | Map userProfile = controllerCtx.getUserProfile();
  | request.setAttribute("org.jboss.portal.header.USER_PROFILE", userProfile);

You can then access attributes from the user profile in your header.jsp:

<c:out value="${requestScope['org.jboss.portal.header.USER_PROFILE']['user.name.family']}" />

If you're on Portal 2.7, the process should be about the same. Check the reference docs for info on accessing the UserProfile in 2.7: http://docs.jboss.org/jbportal/v2.7.1/referenceGuide/html/identity.html

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219439#4219439

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219439



More information about the jboss-user mailing list