Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2006

Tip: Looking for answers? Try searching our database.

HOW TO GET THE CLIENT MACHINE ADDRESS USING APPLET

Thread view: 
gorubhasin@gmail.com - 03 Jun 2006 14:11 GMT
I WANT CLIENT MACHINE ID IAM USING APPLETS

I CAN GET USER NAME USING SYSTEM

THANK U

GAURAV BHASIN
Matt Humphrey - 03 Jun 2006 19:22 GMT
> I WANT CLIENT MACHINE ID IAM USING APPLETS
>
[quoted text clipped - 3 lines]
>
> GAURAV BHASIN

Well, start by using mixed case--you look like you're shouting. And "I want"
is no way to start a request for help.   Try asking for help or asking a
question or something more polite than a demand to those who ask nothing in
return for helping you.  See
http://mindprod.com/jgloss/newsgroups.html#GIFTHORSE and
http://mindprod.com/jgloss/newsgroups.html

Googling for "get client ip" java appet yielded

http://forum.java.sun.com/thread.jspa?threadID=367855&messageID=1556409

clientIP=InetAddress.getLocalHost().getHostAddress();

-OR-

String hostname = InetAddress.getLocalHost().getHostName();
System.out.println(hostname);
InetAddress[] ads = InetAddress.getAllByName(hostname);
for (int i=0; i<ads.length; i++) {
System.out.println(ads[i]);

But in both cases you may get just the local host name or a non-public
(private IP) name.

This response
http://forum.java.sun.com/thread.jspa?tstart=105&forumID=421&threadID=358273&tra
nge=15


shows how you can have the applet bounce a request to the serlvet from which
it came and that servlet can get the public-side IP address of the machine.
Note that even in this case you cannot guarantee that you can use this IP
address to make contact with the client or even to uniquely identify the
client. This is because the client's actual (face, public WAN) IP may be
from a private network and NATTed into a shared IP address or otherwise
non-reverse-routed.  You may find more details at
http://mindprod.com/jgloss/faceip.html

Cheers,
Matt Humphrey  matth@ivizNOSPAM.com  http://www.iviz.com/


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.