You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by ypomonh <yp...@freemail.gr> on 2007/09/29 15:04:03 UTC
PortletRequest.USER_INFO returns empty
While trying to get the user name for the current user I have added:
<user-attribute>
<description xml:lang="en">User Name</description>
<name>user.name</name>
</user-attribute>
to my portlet.xml and in my portlet class:
Map userInfo = (Map)request.getAttribute(PortletRequest.USER_INFO);
String currentUser = (String)userInfo.get("user.name");
response.getWriter().println("currentUser:");
but userInfo returns empty - userInfo.isEmpty() is true.
What fails..?
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org