Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to uniquely identify the client that is running an applet?

0 views
Skip to first unread message

cd...@int.pilotsw.com

unread,
Feb 27, 1998, 3:00:00 AM2/27/98
to

I'm trying to write an applet that will use JDBC to connect to a database
on the server. I want the server to be able to uniquely identify the
client machine and return data keyed to that client. In effect, I'm using
the server to save data specific to the client that I would save on the
client if it weren't for the sandbox.

I've looked at the InetAddress class, but the results don't seem to be
consistent across browsers. For instance, InetAddress.getLocalHost()
returns a fully qualified host name/IP address on Netscape Navigator, but
on IE, it returns localhost/127.0.0.1. If the client and server are the
same machine, it works correctly, but that's not much help to me...

I've also considered having the server assign unique ID's and saving them
as cookies, but Java doesn't seem to have an API for dealing with cookies.
Another reason I don't like that approach is that different browser don't
grok each other's cookies.

Is there another way to reliably distinguish between clients (without
requiring manual user logins)?

Thanks in advance,
Charles Dale
Pilot Software, Inc.

Aaron Porter

unread,
Feb 27, 1998, 3:00:00 AM2/27/98
to

You could do it with cookies. Just have JavaScript
pass the cookie along to your applet. You can get
info about cookies and JavaScript at

http://developer.netscape.com/library/documentation/communicator/jsguide4/advtop
ic.htm

--
__________________________________________________________
Aaron Porter ICQ - 1585210
CTO Cyber Centers, Inc. http://www.cybercenters.com
apo...@cybercenters.com (602) 667-9900 x13

JSQuery is a Servlet that dynamically creates HTML from
scripts on the server. It can be used to connect to any
JDBC supported database to publish your data on the web.

Get your FREE trial version at http://www.jsquery.com
__________________________________________________________


cd...@int.pilotsw.com wrote in message ...
[snip]

Charles R. Lytle

unread,
Feb 28, 1998, 3:00:00 AM2/28/98
to

If you do use cookies, be sure to have a fallback position in case the
client doen't send or receive cookies. I have them turned off on mine
due to abuse by some less than honest sites.

--
Russ Lyttle, PE
<http://www.flash.net/~lyttlec>

0 new messages