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 / April 2006

Tip: Looking for answers? Try searching our database.

Store Java Bean between sessions

Thread view: 
ghadley_00@yahoo.com - 11 Apr 2006 20:04 GMT
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
ghadley_00@yahoo.com
Polzunov Sergei - 11 Apr 2006 20:37 GMT
> Hi,
>
[quoted text clipped - 7 lines]
> Any help would be greatly appreciated.
>  
how about cookies?
Jubz - 11 Apr 2006 20:51 GMT
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.
bob - 11 Apr 2006 21:43 GMT
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


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.