Click to See Complete Forum and Search --> : Storing Textfield value in Memory


priyar
December 13th, 2001, 12:43 PM
Hi,
I have an Applet with a few JtextField that could be either strings or numbers.The values enetered by the user needs to be saved in memory, so that, when the user goes to another html page and returns back to this applet, I want to have the applet with the values that was entered by the user. How do I do this??Please help.

Thank you
Priya

Norm
December 13th, 2001, 06:45 PM
I guess your question is: How to preserve data across browser transits from one HTML page to another?
I dont' know of any way to do it in a Java applet itself. If the browser will keep the JVM that is running the applet around, then everything in the applet's variables will be there. If the browser completely flushes the applet and the HTML page, then where is there a place to save data?

Two choices:
An applet with permission could write a file on the user's disk. Not too likely.
Send the data to the server and have it saved there until the applet asks for it. This would involve server code to do the saving and maintenance of the data.

Norm

priyar
December 14th, 2001, 09:27 AM
Thank you Very Much. It was very useful to me.