Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applets persistent state

 
Partha Athreya
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone plz., tell me hw an applet can maintain persistent state..??
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean exactly?
Do you want to store configuration information on the user's system? on the server?
 
Partha Athreya
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..
First of all i want to know whether r not an applet can maintain its state..whether its on the server r on the system and if it can maintain its state how it can...???
Thnx in adv..
Originally posted by Dirk Schreckmann:
What do you mean exactly?
Do you want to store configuration information on the user's system? on the server?
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Saving persistent information on the server would probably be much easier. A few different strategies are available.
You could use Object Serialization. Take a look at The Object Serialization Section of Sun's Java Tutorial.
To save user preferences that are loaded only once or twice and saved only once or twice per session, you may want to take a look at the new Preferences API in Java 1.4.
Applets are subjected to higher security restrictions than applications and cannot read or write files to the host's system (ordinarily). For a work around to allow reading and writing to the applet's host system, take a look at The Working with a Server-ide Application Section of Sun's Java Tutorial.
Good Luck.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic