Finding the IP address of client proxy from Server side component

Discussion in 'Java' started by saurabh.chakote@gmail.com, Nov 18, 2005.

  1. Guest

    Hi , All
    I just want to find out the IP address of the firewall (proxy) for my
    client machine from my server side component.
    as the
    >> getInetAddress()
    >> getHost()

    methods returns the ip address of local machine.

    regards
    Saurabh Chakote
    , Nov 18, 2005
    #1
    1. Advertising

  2. I suppose your Client is Java-based, and uses RMI for connecting to the
    Server (if you are using a context lookup service to locate your server
    components, it is still the RMI underneath). When the RMI communication
    layer formats data packets on the client side, they are stamped with the IP
    address found in java.rmi.server.hostname property; if the property is not
    set, it will use the host's local address.

    If you have control over the client's machine, you can put the address of
    the firewall in a file, and load it into the properties early in the
    client's life (before the server lookup). If not, you may want to introduce
    another call to the server prior to the lookup, this one based on the HTTP
    protocol (i.e. using the URLConnection). The server can get the "real"
    (firewall's) IP address from the doGet's or doPost's ServletRequest
    parameter, and return it to the calling client. This way the client will
    know the IP address of the firewall.

    HTH

    Alex Molochnikov
    Gestalt Corporation

    <> wrote in message
    news:...
    > Hi , All
    > I just want to find out the IP address of the firewall (proxy) for my
    > client machine from my server side component.
    > as the
    > >> getInetAddress()
    > >> getHost()

    > methods returns the ip address of local machine.
    >
    > regards
    > Saurabh Chakote
    >
    Alex Molochnikov, Nov 18, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jim Hammond
    Replies:
    1
    Views:
    738
    Jim Hammond
    Nov 12, 2003
  2. Replies:
    0
    Views:
    433
  3. JackRazz

    Finding a Component's (ComponentModel.Component) Parent Form

    JackRazz, Mar 4, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    462
    John Saunders
    Mar 4, 2004
  4. A.M-SG
    Replies:
    2
    Views:
    390
    Steven Cheng[MSFT]
    Nov 2, 2005
  5. Miguel Guerreiro

    server-side ASP w/ client -side component

    Miguel Guerreiro, Aug 4, 2003, in forum: ASP General
    Replies:
    0
    Views:
    127
    Miguel Guerreiro
    Aug 4, 2003
Loading...

Share This Page