Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Applets persistent state

 
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..??
 
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.
 
Space seems cool in the movies, but once you get out there, it is super boring. Now for a fascinating tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic