tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Egidijus Drobavicius" <egidi...@vb.lt>
Subject Re: Session vs Beans
Date Mon, 21 May 2001 14:58:28 GMT
I think bean is much more clear approach. As i understood you have 2 ways --
store items directly to hashtable or store javabean and all you items into
this bean.
If you choose the first way the hashtable of the session would contain
pretty much of your crap and in case you want to dump all of it you will run
into problems which of these items are necessary for you and which were
placed by some other bean/jsp or so on.
If you use your own bean with a scope set to session (actually this would
place your bean to the _same_ hashtable of session object), you will have
all your form based valued concentrated in one single bean and that data
will be encapsulated.
When looking at performance and memory consumtion issues, the difference
will me so miserable that even computer would not be able to distinct :)
Regards,
Egidijus

----- Original Message -----
From: <Sulman.Jeff@epamail.epa.gov>
To: <tomcat-user@jakarta.apache.org>
Sent: Monday, May 21, 2001 3:17 PM
Subject: Session vs Beans


> Last week I proposed this question to the discission group:
>
> I am currently writing a pretty complex data entry HTML page for an
> application.  The HTML has 7 different frames where data is input, one
> represents the master table and the others detail tables.  I am trying to
> come up with a way to keep all of the data entered into each frame for
> updating the database (I want to update all the records in one
> transaction).  There some obvious ways of doing this as with invisible
> fields on the master frame, and URL rewriting (cookies are out in this
> case) but I have also been looking into using the Session object.  I know
> the object is used for shopping carts on commercial web sites but would it
> be a good to use it to keep all the input values for various input forms?
> There will be from 40 - 50 items of data stored in the session object and
a
> user will only be able to have one form at a time?
>
> The unamious (and very helpful)  response was "yes use a session object".
>
> Now however, I have learned to use Java Beans in JSP and was wondering, is
> it better to use a session object or a Java Bean with the scope set to
> "session" to store these values?
>
> Thanks for you help
>
> Jeff Sulman
>
>


Mime
View raw message