wood burning stoves 2.0
The moose likes Applets and the fly likes Remembering username and password in an unsigned applet... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Applets
Bookmark "Remembering username and password in an unsigned applet..." Watch "Remembering username and password in an unsigned applet..." New topic
Author

Remembering username and password in an unsigned applet...

James Hodgkiss
Ranch Hand

Joined: Jan 22, 2004
Posts: 401
Does anyone have any ideas how my unsigned applet could remember the username and password entered by a user?

Previously, I was using a signed applet so could store the username and password in a persistent text file, but now I need to provide an unsigned applet solution - so does anyone have any suggestions for how my applet could remember and recall the username and password?

Many thanks,
James
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42958
    
  73
Java 1.4 introduced a way for applets to store information. Check out the AppletContext.setStream, getStream and getStreamKeys methods.
James Hodgkiss
Ranch Hand

Joined: Jan 22, 2004
Posts: 401
Thanks for the reply. Unfortunately, I'm in Java 1.1. Any other ideas?
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42958
    
  73
If that means that you're using the age-old MS JVM in IE, you might be lucky. It does a good job of interfacing applets with JavaScript via LiveConnect, and JavaScript can set and retrieve cookies (which in turn can contain the preferences).

Googling for "cookie.js" will find any number of JS cookie libraries.

Some links about LiveConnect are in the Applets FAQ.
James Hodgkiss
Ranch Hand

Joined: Jan 22, 2004
Posts: 401
Thanks!
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Remembering username and password in an unsigned applet...
 
It's not a secret anymore!