thanks your replay
i tryed request.getRemoteUser(),
but i'm getting null.
Main Topics
Browse All TopicsHi Experts,
my application will execute at office i want to display who are login to my application that login name should display welcome: xxxx,
how to get the remote username in java.
i tryed System.getProperty("user.n
but it working only local system i want remote system user name.
could you send me some code.
thanks.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
sorry i didn't get you.
when i use System.getProperty(), this method will giving login name only my local system
insted of System.getProperty i'm using request.getRemoteUser()
this time i'm getting null,
i think not working getRemoteUser, i'm trying to print both System.getProperty i'm getting login name but getRemoteUser i'm getting null value.
i'm using Websphere6.1, jsp
thanks.
System.getProperty will give you only the local name because its reading the local system property. ( i.e. the server where its running).
getRemoteUser will get the user name that is set in the HTTP header IF its set there..
does your application use any kind of login password mechanism? or its open to all?
if your app is open to all, you can not use getRemoteUser, specifically you can not use getRemoteUser to get the windows domain login information ( I am assuming that your clients are running on windows)..
you will have to use a third party tool ( JCIFS)
http://jcifs.samba.org/
by using this, you should be able to implement the whole NTLM security model.
the basic authentication is there, but it will not be able to provide you the NTLM ( i.e. windows domain authentication which you are trying to use)..
However if you aim is to only get the user name and not really authenticate, then you can turn on the basic authentication on websphere and try to see if getRemoteUser gives you a name.
the API says that the getRemoteUser will return null for all non autheticated access. and will give the name for which authetication is set as required.
Business Accounts
Answer for Membership
by: objectsPosted on 2009-04-30 at 18:15:58ID: 24276031
you can use the getRemoteUser() method