1 Reply Latest reply on Jun 14, 2006 2:02 PM by andrewboyd

    How to get client ip inside the server running?

    laok2003

      Hello, all.
      Based on a biz request, i need to get the client ip connecting to my server, my application is a EJB pattern.

        • 1. Re: How to get client ip inside the server running?
          andrewboyd

          You might try HttpRequest.getRemoteHost()

          From the javadoc:
          Returns the fully qualified name of the client that sent the request. If the engine cannot or chooses not to resolve the hostname (to improve performance), this method returns the dotted-string form of the IP address. For HTTP servlets, same as the value of the CGI variable REMOTE_HOST.