title: Get LAN client machine name in servlet based web application
body: <p>I have spring MVC application, that runs in LAN. In there client machines IP addresses are changing time to time. Therefore I want to get client machines names(Their machine name is fixed ),because I want to get client machine's details without creating log in. </p>
  
  <p>Is that possible to get client machine's name?? if it's possible how??
  Or is there any other way to get that user details</p>
  
  <p>Edit:
  codes I have tried so far</p>
  
  <p>In HttpServlet</p>
  
  <pre><code>public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { 
      String hostname = request.getRemoteUser(); //this gives null
      String hostname = request.getRemoteHost(); //This gives host machine name
  }
  </code></pre>
  
  <p>Edit: reply to @Eugeny Loy
  In web.xml</p>
  
  <pre><code>&lt;init-param&gt;
      &lt;param-name&gt;jcifs.smb.client.username&lt;/param-name&gt;
      &lt;param-value&gt;username&lt;/param-value&gt;
  
  &lt;/init-param&gt;
  </code></pre>
  
  <p>In serverlet class </p>
  
  <pre><code>String username = config.getInitParameter("username");//This gives client IP address
  </code></pre>