Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Retrieve user Information

 
Felipe Arcos Velez
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic