Frank,
Thanks. RenderRequest's getRemoteUser returned me null, however the
getUserPrincipal() returns the value correctly. I thought both should
return the same value. Anyway, thanks for you help.
Later,
Hema
On Fri, 11 Mar 2005 07:08:52 -0600, Frank Villarreal
[EMAIL PROTECTED] wrote:
Hema,
I'm not positive that you can get a list of the User's roles in a direct
way without rewriting the user-management implementation ... but you can
certainly check to see if a user is in a specific role by using the
PortletRequest object's isUserInRole and getRemoteUser methods ...
HTH,
- Frank
-Original Message-
From: Hema Menon [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 10, 2005 08:48 PM
To: Jetspeed Users List
Subject: Re: User Attributes with Struts Portlet bridge on Fusion
Thanks Frank. Redeployment seems to take care of it. I was thinking of
getting the login name, not the user first name. Now, how can I get
the logged in user's loginname and role?
Thanks,
Hema
On Thu, 10 Mar 2005 16:36:37 -0600, Frank Villarreal
[EMAIL PROTECTED] wrote:
Make sure you re-deploy your portlet application, b/c J2 caches the
portlet.xml in the database and will not pick up changes to
your portlet.xml
file if you edit it directly in ${webapps}/yourapp/WEB-INF/portlet.xml
directly ...
- Frank
-Original Message-
From: Hema Menon [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 10, 2005 04:28 PM
To: Jetspeed-User
Subject: User Attributes with Struts Portlet bridge on Fusion
I am trying to get the user attributes (user name) from a servlet
filter in my struts application. I have the user-attribute defined
in portlet.xml. However when I try to get the user attributes from the
PortletRequest, I am getting null. Is there something I am missing?
The code gets the PortletRequest first and then tries to get the
USER_INFO attribute from the PortletRequest.
PortletRequest portletReq =
(PortletRequest)request.getAttribute(javax.portlet.request);
Map userInfo = (Map)
portletReq.getAttribute(PortletRequest.USER_INFO);
This returns a null for userInfo.
Can someone suggest a better way to getting the User information from
the struts portlet?
Thanks,
Hema
--
~~
Hema Menon
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
~~
Hema Menon
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
~~
Hema Menon
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]