Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to get remote user?

Tarek FathyMay 20 2012 — edited May 21 2012
Dear all
I write this code to get the remote user but it returns null
 FacesContext ctx = FacesContext.getCurrentInstance();
                          ExternalContext ectx = ctx.getExternalContext();
                          HttpServletRequest request = (HttpServletRequest)ectx.getRequest();
                          System.out.println(request.getHeader("REMOTE_USER"));                         
the result is null.
can any one help me how to get the remote user name.

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 18 2012
Added on May 20 2012
7 comments
1,382 views