HOW TO GET THE CLIENT MACHINE ADDRESS USING APPLET

G

gorubhasin

I WANT CLIENT MACHINE ID IAM USING APPLETS

I CAN GET USER NAME USING SYSTEM

THANK U


GAURAV BHASIN
 
M

Matt Humphrey

I WANT CLIENT MACHINE ID IAM USING APPLETS

I CAN GET USER NAME USING SYSTEM

THANK U

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);

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&trange=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 (e-mail address removed) http://www.iviz.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top