Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2006

Tip: Looking for answers? Try searching our database.

Applet - maintain state between destroy() and init()

Thread view: 
VisionSet - 26 Jun 2006 16:35 GMT
I have a signed applet that appears on every page.  I need to save and
retrieve an object between page navs.  I thought System.properties may
be the way, but it seems you can only store Strings.  Any other ideas
anyone?

TIA,
Mike W
Andrew T. - 26 Jun 2006 16:42 GMT
> I have a signed applet that appears on every page.  I need to save and
> retrieve an object between page navs.  I thought System.properties may
> be the way, but it seems you can only store Strings.  Any other ideas
> anyone?

Serialisation or XML encoding to the local file system.

(Cookies managed via JS/Java would not fill the requirement?).

Andrew T.
Mark Space - 26 Jun 2006 17:20 GMT
> (Cookies managed via JS/Java would not fill the requirement?).

I was going to say the same thing.  Set a cookie for the session.  Save
user state in a session object.  When the applet is started, have it
download the saved session information from the server.
VisionSet - 27 Jun 2006 09:20 GMT
> > (Cookies managed via JS/Java would not fill the requirement?).
>
> I was going to say the same thing.  Set a cookie for the session.  Save
> user state in a session object.  When the applet is started, have it
> download the saved session information from the server.

Unfortunately the state is an object I need a reference to, actually a
Jabber/XMPPConnection to a chat server.  The user is logged on so
hopefully somehow I can recreate the connection based on the log in,
but I don't know how at present.
Otherwise I'll play with the serialisation option.

--
Mike W


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.