my dog learned polymorphism
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

Retrieve user Information

Felipe Arcos Velez

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?


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

Joined: Aug 26, 2006
Posts: 4968

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?


Felipe Arcos Velez

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.


Biju moozhikkara

Joined: Oct 21, 2005
Posts: 20
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 ]
I agree. Here's the link:
subject: Retrieve user Information
It's not a secret anymore!