title: HttpServletRequest.getRemoteAddr() returning wrong address
body: <p>We need to log the client's IP address from a Seam action. Currently, we're using the code:</p>
  
  <pre><code>ExternalContext context = FacesContext.getCurrentInstance().getExternalContext();
  HttpServletRequest request = (HttpServletRequest)context.getRequest();
  
  this.remoteAddress =  request.getRemoteAddr();
  </code></pre>
  
  <p>However, this seems to be always returning an internal address of our network, rather than the client's IP address. From my research, it seems that having a reverse proxy in the network can confuse things, but we might be able to fix it by reconfiguring our web servers. Has anyone else had this problem, and how did you solve it?</p>
  
  <p>We're using JBoss 5.1 app servers and Apache web servers. Thanks!</p>