Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Remembering username and password in an unsigned applet...

 
James Hodgkiss
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java 1.4 introduced a way for applets to store information. Check out the AppletContext.setStream, getStream and getStreamKeys methods.
 
James Hodgkiss
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply. Unfortunately, I'm in Java 1.1. Any other ideas?
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic