This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Applets and the fly likes Remembering username and password in an unsigned applet... Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Applets
Reply 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
Marshal

Joined: Mar 22, 2005
Posts: 35241
    
    7
Java 1.4 introduced a way for applets to store information. Check out the AppletContext.setStream, getStream and getStreamKeys methods.


Android appsImageJ pluginsJava web charts
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
Marshal

Joined: Mar 22, 2005
Posts: 35241
    
    7
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 agree. Here's the link: http://aspose.com/file-tools
 
subject: Remembering username and password in an unsigned applet...
 
Similar Threads
Servlets - How secure are they?
Applet - Applet Communication
Sending data to an applet.
Is there some trick to prevent decompilers from seeing my password?
reading passwords and connections from a flat file