title: How to get username of currently logged user on client machine in Java?
body: <p>When the user (client) tries to get into the application by typing the URL, i need to get that machine's windows logged in username. </p>
  
  <p>I have tried with <code>System.getProperty("user.name")</code> but when I access the application from some other machine (client) then this still shows username of logged in user on server. I want this is to be changed according to the client machine username every time.</p>
  
  <p>And also I have tried with some JavaScript code, it only works on IE but we are using Firefox.</p>
  
  <p>Kindly suggest the possible ways to work with all kind of browsers. </p>
  
  <p><strong>Application Details:</strong></p>
  
  <p><strong>View:</strong> Struts<br>
  <strong>Application Framework:</strong> Spring 3.1.1<br>
  <strong>Application Server:</strong> jboss-6.1.0.Final<br>
  <strong>Server OS:</strong> CentOS 5</p>