[jboss-user] [JBoss Portal] - Re: Retrieving username in portlet after login

webhunter do-not-reply at jboss.com
Mon Aug 13 06:24:39 EDT 2007


ok found it.

you can  use the getUserPrincipal() method on the PortletRequest object.

If you are wondering where is the PortletRequest object, the "rRequest" object in protected void doView(RenderRequest rRequest, RenderResponse rResponse) is the PortletRequest object.

To get the actual user name you could use:
rRequest.getUserPrincipal().getName()

Cheers.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073496#4073496

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073496



More information about the jboss-user mailing list