File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes how to get user name of the client machine Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "how to get user name of the client machine" Watch "how to get user name of the client machine" New topic
Author

how to get user name of the client machine

vikas sharmaa
Ranch Hand

Joined: Jun 28, 2007
Posts: 191
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

Joined: Oct 27, 2005
Posts: 19538
    
  16

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to get user name of the client machine
 
Similar Threads
Delegating requestes to different servlets based on the submission.
Getting the Client machine name
Windows username?
How to obtain the destination machine information
Need to get the user id of the machine raising the request.