There was an interesting posting the other day on this, I tend to stick stuff in the session because I cant be arsed messing around. After things are working I then see whether i can move things out. There seems to be a lot on not storing stuff in the session i imagine because things can get kinda heavy but then this begs the question what are sessions for?

I think people become a bit paranoid about sessions because java is kinda heavy in this respect, and garbage collection has remained an issue since its beginnings. But IMO thats for the folks you build the JVM's to worry about.

If you want something to persist beyond the request then I suggest put it in the session. By the time you've messed around trying to avoid this you could have brought more hardware to deal with the problem.

I'd say same as wendy, although look back if anything breaks.

IMO storing values as hidden form values is ugly, I'd use it as a hack if using session breaks anything (which is doubtful) just set stuff to null when you're finished and hope the garbage collector comes along.



On 11 Feb 2004, at 22:01, Pani R wrote:

Thanks for the advice Wendy.

I may end up storing all the values in the Session. But, on the other side, how would I store it in the hidden form variable. I think if I store it in my hidden variable, then its available to me in the action class via getParameter() which will return me a String object against my User Defined Object. Is there any other way to do that?

Pani

--

--------- Original Message ---------

DATE: Wed, 11 Feb 2004 13:27:11
From: Wendy Smoak <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Cc:

From: Pani R [mailto:[EMAIL PROTECTED]
Now, when the un-logged user tries to register, where am I
suppose to store the Registration Values, Session or Request?
Which one will be the better approach and why?

I'm not entirely sure when the session officially gets created, I just
expect it to be there, and it always is. If you're going to need
something across requests, you can either jump through hoops and put it
in hidden form elements, etc., or just stuff it in the session.


I tend to treate memory and disk space as infinite resources, which may
not scale, but works for my purposes. My vote is to put your values in
the session and don't look back. Others may disagree...


-- Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





____________________________________________________________
Find what you are looking for with the Lycos Yellow Pages
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/ default.asp?SRC=lycos10


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to