GeeCON Prague 2014*
The moose likes Portals and Portlets and the fly likes Retrieve user Information Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "Retrieve user Information" Watch "Retrieve user Information" New topic
Author

Retrieve user Information

Felipe Arcos Velez
Greenhorn

Joined: Mar 30, 2004
Posts: 9
Hello, i am trying to retrieve the user login string in a JSR 168 Portlet running in Websphere Portal, i am trying with PortletRequest.getUserPrincipal and PortletRequest.getRemoteUser methods but both return null.

What is the way?

Thanks.


Felipe Arcos Velez
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

Are you trying to get the users name, or are you trying to get the entire string associated with the URL that was used to invoke the portal server? I'm a little unclear.

Also, is this a publicly accessible portlet, being tested on a public page, or does the environment require you to log on before testing.

Which version of WebSphere Portal?

Regards,

-Cameron
Felipe Arcos Velez
Greenhorn

Joined: Mar 30, 2004
Posts: 9
Hello Cameron, i am using ibm websphere portal 5, i just need the user name or user login, nothing else, the portlet is private so the user is authencated when he get there.

Thanks,

Felipe.
Biju moozhikkara
Greenhorn

Joined: Oct 21, 2005
Posts: 20
hai,
You can use portalContext.getCurrentUser().getDisplayName();
This worked fine in vignette based environment.Hope similier method is there for other env tooo
[ September 18, 2006: Message edited by: Biju muzhikara ]
 
GeeCON Prague 2014
 
subject: Retrieve user Information