Results 1 to 3 of 3

Thread: JSP Help

  1. #1
    chyrl is offline Senior Member
    Join Date
    Mar 2010
    Location
    Manila, Philippines
    Posts
    257
    Rep Power
    5

    Exclamation JSP Help

    Greetings,

    I am developing a web application using JSP.
    I was wondering if JSP could trace your IP in WhatIsMyIP and get the IPv4 address when accessing the web application.

    Also, could a JSP prompt a JavaSE Application the addresses?
    To give a clearer view, it's like a network traffic monitoring application.

    Thanks,
    Cyril H.
    Every project, package, class, method, variable, syntax, algorithm, etc.
    are registered in my memory bank. Thanks to this thread.

  2. #2
    FON
    FON is offline Senior Member
    Join Date
    Dec 2009
    Location
    Belgrade, Serbia
    Posts
    366
    Rep Power
    6

    Default

    This kind of things are usually done in javax.servlet.Filter.

    Use Filter to find client IP, log and perform all other things you need before starting to work with them in your app logic.

    For IP you can use javax.servlet.ServletRequest:

    request.getRemoteAddr(),
    request.getRemoteHost()

    in your filter.

    Also, could a JSP prompt a JavaSE Application the addresses?
    What this means?

  3. #3
    chyrl is offline Senior Member
    Join Date
    Mar 2010
    Location
    Manila, Philippines
    Posts
    257
    Rep Power
    5

    Default

    Well it means, when you have acquired the two IP addresses.
    The data won't be displayed on the page but it would be send to a Java application on the server (via Socket I guess) without opening a JApplet.
    Is this possible?
    Every project, package, class, method, variable, syntax, algorithm, etc.
    are registered in my memory bank. Thanks to this thread.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •