Hi Bin, I think I wasn't clear enough. Because, that's exactly what I want to do ! :) I just want to have a session scope Object.
So, let me reformulate my "problem": I have, for example, 3 Strings. The contents of these Strings can dynamically change. These Strings contain different values between each user. So, normally you'll set that values into a cookie placed at the Client's computer. But I don't want to do that, so I was first thinking about a session bean. That bean would contain those Strings and will be instanciated for each user (am I wrong ?). So normally, a session bean will be perfect in that case, won't it ? But, if I understood right, the session bean is placed into the HttpSession object. So, why not place those Strings directly into the HttpSession object ? (using the getAttribute and the setAttribute methods) But, after a second thought, as I don't have only 3 (or 5) Strings to share (between all my Action classes) during a session of a user. I was thinking that maybe, placing those Strings as parameters of my Action classes would be sufficient. So between those 2 solutions, which one is the best ? And is there maybe a better solution ? Voilą, I hope that now I made myself clear (please excuse my poor English :) I also hope, I didn't tell to much stupidities (I'm just a newbie :) Any help would be greatly appreciated ! Friendly Regards, Slimane PS: sorry for the long reply... At 20:31 9/03/2002 -0500, you wrote: >Slimane > >Neither way will work for you as the session object will be for a single >user only. Putting things in the URL query string has the same effect. >What you should be looking for may be Appliation scope object or some >other ways like persist the data to the database or server file etc. > >Hope this helps. > >Bin > > >>From: Slimane <[EMAIL PROTECTED]> >>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >>To: [EMAIL PROTECTED] >>Subject: What's the rigth way to do it ? >>Date: Sat, 09 Mar 2002 23:30:24 +0100 >> >>Hi, >> >>I have a set of Objects (mainly Strings) that I would like to share inside >>my web application for each user. So I was thinking about setting all these >>objects using the HttpSession object. (using the methods getAttribute() and >>setAttribute()). >> >>But in a second thought, as there are only a few String that I need to >>share. I could easily pass them as parameters to my Action classes. >> >>So, I was wondering what's the right way ? If there's only a few Strings, >>isn't it easier to pass them as parameters instead of using the session >>object ? >> >>Thanx in advance for your replys. >> >>Friendly Regards, >>Slimane >> >> >>-- >>To unsubscribe, e-mail: >><mailto:[EMAIL PROTECTED]> >>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > >_________________________________________________________________ >MSN Photos is the easiest way to share and print your photos: >http://photos.msn.com/support/worldwide.aspx > > >-- >To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>