Store Java Bean between sessions

G

ghadley_00

Hi,

I have a web site with forms that currently use a javabean to store
data. Is it possible to have the java bean (and its data) persist
between visits to the site? (In other words, if someone visits the
site, enters data, closes the browser, and then revisits the site, the
forms would read the data from the stored java bean - and preferably
display the information in the form fields).

Any help would be greatly appreciated.

Best wishes,

George Hadley
(e-mail address removed)
 
P

Polzunov Sergei

Hi,

I have a web site with forms that currently use a javabean to store
data. Is it possible to have the java bean (and its data) persist
between visits to the site? (In other words, if someone visits the
site, enters data, closes the browser, and then revisits the site, the
forms would read the data from the stored java bean - and preferably
display the information in the form fields).

Any help would be greatly appreciated.
how about cookies?
 
J

Jubz

I'd probably think of a strategy of persistance outside the bean
itself. For example, having the bean generate an XML file with the name
of the user (any way you can ensure it is uniquely identifiable with
every visit). This way, when the user logs in, you read the file and
reistate persistent data. As they modify or submit their data set, you
save it.

Remember Java has a means of converting objects directly to XML. The
class is smart enough to handle collections as well, and can be
restored in a snap.
Also, you can use session objects, and figure out a way of backing them
up to file (uniquely identifiable by user) when they are done or when
the session expires.

In my experience, I use unique GUIDs for users, and use these
identifiers to track user activities on my sites.
 
B

bob

Another persistence strategy is to save the session state information
in an OODB.

GemStone Facets has an easy to use "persistence by reachabiltiy" model
that has been used to manage session state in a number of applications.


You can get more info about Facets at http://www.facetsodb.com

Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top