how to get IP via JSP code

Discussion in 'Java' started by KK, Jul 22, 2008.

  1. KK

    KK Guest

    Can anyone tell me the JSP code to get ip address of the site
    visitors?
    if yes plz let me know.

    thanks

    KK
     
    KK, Jul 22, 2008
    #1
    1. Advertising

  2. KK

    Dave Miller Guest

    KK wrote:
    > Can anyone tell me the JSP code to get ip address of the site
    > visitors?
    > if yes plz let me know.
    >
    > thanks
    >
    > KK

    You might want to get a copy of the API - it's how we find our way
    around the class libraries. Under:

    javax.servlet Interface ServletRequest

    you'll find:

    java.lang.String request.getRemoteAddr()

    --
    Dave Miller
    Java Web Hosting at:
    http://www.cheap-jsp-hosting.com/
     
    Dave Miller, Jul 22, 2008
    #2
    1. Advertising

  3. KK

    KK Guest

    thanks it helped..
     
    KK, Jul 22, 2008
    #3
  4. KK

    Lew Guest

    KK wrote:
    > thanks it helped..


    The Javadocs familiarly do.

    --
    Lew


    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    From Jewish "scriptures".

    Baba Kamma 37b. The gentiles are outside the protection of the
    law and God has "exposed their money to Israel."
     
    Lew, Jul 23, 2008
    #4
    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. Ed
    Replies:
    8
    Views:
    26,162
    Chris Smith
    May 18, 2004
  2. DigitalUncle
    Replies:
    0
    Views:
    919
    DigitalUncle
    Nov 2, 2004
  3. Wenfei
    Replies:
    0
    Views:
    7,328
    Wenfei
    May 1, 2006
  4. Replies:
    0
    Views:
    4,406
  5. ctbang
    Replies:
    1
    Views:
    141
    Thomas 'PointedEars' Lahn
    Jan 20, 2006
Loading...

Share This Page