>>> Milt Epstein <[EMAIL PROTECTED]> 11-Sep-00 5:09:37 PM >>>

>> > I am hv a problem, hope u will help ,using *request* interface
we
>> > can get the client's IP address ok!
>> > I need get the Client's location with that IP Address.ie., from
>> > where he/she is requesting

>> I have been looking at this, and I found nothing. But I did
figure
>> out out it could be done, so if interested, I can organize an
small
>> open-source project for this.

>Is there some reason that getRemoteHost() and getRemoteAddr()
>aren't sufficient?  (These are actually methods in the
ServletRequest
>interface, which HttpServletRequest extends.)

It seems to me that the original poster was asking how to work out
what the physical location of a request is.

AFAIK it is not possible to do this reliably.

The Linux DNS HOW-TO suggests that you can do it by domain name
(which doesn't work reliably and doesn't work at all if you're
interested in Americans).

For example if a server in the UK wants to make sure that only UK
people connect then you just reverse lookup the domain name from the
IP address and check that it ends with .uk.

It doesn't suggest what you do with people who connect in the UK from
non-named machines of machines with top-level domains, eg: .com.

If this is good-enough you can use the facilites provided by
InetAddress to do reverse lookups.


If someone knows of a way of establishing physical location except by
DNS I'd love to know!


Nic

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to