title: How to get Remote / Client IP address using RESTful web service in java?
body: <p>I have written Rest web service in my project.The web service call may come from different machine.so i need to find out the IP address through REST webservice.</p>
  
  <p>From this <a href="https://stackoverflow.com/questions/3825084/rest-how-get-ip-address-of-caller">link</a> <strong>request.getRemoteAddr()</strong> to use this.</p>
  
  <p>But i cant use getRemoteAddr(). Because my request and response are xml format.</p>
  
  <p>I have used post method in REST service.Tomcat server.I have send request as xml format.</p>
  
  <p>How can i get the IP address?</p>