title: How to access the ip address of a client in java
body: <p>In my code in want to print the ip address of the client system.My front end and back end codes are in same server.My client systems ip is 192.168.2.3(not actual) and server up is 192.168.38.1(not actual).When i run the services its getting that local host address only (ie localhost).</p>
  
  <p>request.getRemoteAddr(); </p>
  
  <p>I am using this code to get the ip.</p>
  
  <p>Why its happening and how can I resolve that?</p>