title: jax ws getting client ip
body: <p>I'm trying to retrieve the client IP with JAX-WS, I used:</p>
  
  <pre><code>@Resource
  WebServiceContext wsContext; 
  
  MessageContext mc = wsContext.getMessageContext();
  HttpServletRequest req = (HttpServletRequest)mc.get(MessageContext.SERVLET_REQUEST); 
  
  log.info("["+req.getRemoteAddr()+"])
  </code></pre>
  
  <p>I get a <code>NullPointerException</code> in req, mc is not null.</p>
  
  <p>My question is which JAR to use for <code>HttpServletRequest</code> because I'm using a Java stand-alone application?</p>
  
  <p>Thanks</p>