Michel wrote:
>
> 1 - getting the I.P. address is easy, since is should be sent to the
> host, to get a  response;
>

 Well, you can get somebody's IP address, it just might not
be the user's IP address. There are many situations in which
the user wouldn't have a "real" IP address.


> 2 - getting the host name (domain name) requires a call to another
> server, and may not be readily available
>

 More or less, but even worse. Even if you can get the IP
address you want, there's no particular reason to assume it
has a name at all, much less that the name is available.


> A work-around would be to make a call to one of the servers
> that offer a domain name look-up, and use that.
>

 It can get very involved. Best to try

   java.net.InetAddress.getByName().

 Assuming your network is set up right, it should do all the
work for you. But for the reasons above, it still might not
work.

 One thing: If you're in a controlled environment like a
corporate internet, you can make much stronger assumptions.


-cks








-

___________________________________________________________________________
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