How to get current logined user name?

Hi i made a jsr 168 compliant portlet in Netbeans 6.5 and that portlet is working fine in my webmthod server.

Well my prob is i need to have the current user name if i were making a portlet in MWS the easy way to do this was using

String usernmae = getFacesContext().getExternalContext().getRemoteUser();

But now prob is i have made portlet in netbeans? Now how can i have the user name of current logined user?

urgent help is requuired .

Tahir Aziz

Try the getRemoteUser() method from the portlet request object.