title: Obtaining clients IP address in GWT and Google App Engine
body: <p>I have a need to capture IP address of the client in my GWT/GAE (Java) application. Since GAE does not support full set of java.net APIs I cannot do code such as snippet below. Can anyone suggest reliable way of achieving the same?</p>
  
  <pre><code>for (final Enumeration&lt;NetworkInterface&gt; en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) {
      final NetworkInterface intf = en.nextElement();
      for (final Enumeration&lt;InetAddress&gt; enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements();) {
          final InetAddress ip = enumIpAddr.nextElement();
          if (!ip.isLoopbackAddress() &amp;&amp; !ip.isLinkLocalAddress() &amp;&amp; !ip.isAnyLocalAddress()) {
                  return ip.getHostAddress().toString();
          }
      }
  }
  </code></pre>
  
  <p>For Python version one can do:</p>
  
  <pre><code>os.environ['REMOTE_ADDR'] 
  </code></pre>
  
  <p>or</p>
  
  <pre><code>String ip = self.request.remote_addr;
  </code></pre>
  
  <p>But what would be a Java equivalent?</p>