Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get user name of the client machine

 
vikas sharmaa
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
we can get the name of current user logged in to the system by using System.getProperty("user.name") method call. But, how could we get the user name of the client machine from the server machine? here client is sending request to server machine using browser. On getting first request, server has to determine the user name of the client. we are not using applets in our application. Please help me. Thank you.
 
Rob Spoor
Sheriff
Pie
Posts: 20605
60
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let the client send the user name along with the rest of the request. The server can't possibly know who the user is unless someone told him so.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic