I wrote a system to handle a similar problem.  My approach was to write a
server component, like a manager class, that stores instances of javabeans
for each concurrent user.  I made the manger object containt a static method
which was used to obtain a reference to it, and preloaded a servlet with my
servlet engine configuration that instantiated the manager.  This way, there
would always be a reference to the object in memory.

When the user submitted the first form, cotrol went to a servlet which asked
the manager object to create a new instance of the bean, which put it in the
hashtable.  The bean knew what it's own hashkey was, so that the servlet
only had to pass the hashkey to the next form via URL appending.  This way
that form could obtain the correct reference to that particular bean, and
use it however you need to.

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Paul Medcraft
Sent: Thursday, November 04, 1999 5:53 AM
To: [EMAIL PROTECTED]
Subject: Session values question


I need to store form field values from a fairly large form (75 fields) so
that later forms can be prepopulated. I have written a Bean that uses a two
dimensional array of Strings to hold field names and values.

This works well, but I am unsure how it will affect server performance when
accessed by a lot of users concurrently. Am I right in thinking that session
values are stored in the Server's memory?

Also, I know I could simply have written the field names & values directly
to the Session Object rather than writing the Bean. Is there much difference
apart from adding an unnecessary component? (I went for the Bean as I hadn't
used one before and wante to try it out.)

Thanks,

Paul

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to