hi, Got the answer by myself
you should use either :
req.getRemoteUser() or req.getUserPrincipal().getName()
if the user is not logged in then req.getRemoteUser() is null and same for
req.getUserPrincipal()
Thanks
JG
View the original post :
Hi all,
Can any one help in to get some info on how to get user credentials into a
portlet..
(ie. I need to get the loggedin userName and userID inside the portlet.)
The technique which is used in portal-core.war/.../.../.../header.jsp don't
work inside a JSP or JSR-168 portlet..
Thanks