> > I suppose the form bean is created the first time I use a jsp:useBean tag > > in my jsp file, isn't it ? > > > > (for example: <jsp:useBean id="searchbydateform" scope="session" > > class="be.stluc.info.struts.SearchByDateForm"/>)
Actually, the creation of the ActionForm bean is handled by the Struts framework itself (I guess by the controller servlet?). That's how forms can be populated "automatically" via the Struts taglibs and then passed to the Action class associated with this particular ActionForm class. This is just a shot in the dark...but perhaps the explicit creation you are specifying by the <jsp:useBean> tag is screwing up Strut's management of the ActionForm bean? In any case, you don't need to use the <jsp:useBean> tag at all for ActionForm beans, as Struts takes care of instantiating, read/writes, and scope management for these beans. --joe -----Original Message----- From: Slimane Zouggari [mailto:[EMAIL PROTECTED]] Sent: Friday, March 15, 2002 9:15 AM To: Struts Users Mailing List Subject: Re: problem with bean having session scope Thanx, I supposed it was something like that :) The thing is, I still don't understand why my beans aren't shared among all of my action classes :( Friendly Regards, Slimane At 12:05 15/03/2002 -0500, you wrote: >AFAIK, a session bean is destroyed when the session expires (30 min by >default). > >Otavio > >----- Original Message ----- >From: "Slimane Zouggari" <[EMAIL PROTECTED]> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >Sent: Friday, March 15, 2002 12:02 PM >Subject: Re: problem with bean having session scope > > > > well as nobody seems to have a clue about my problem. I'll ask my question > > differently :) > > > > When is a session bean destroyed ? > > If I specify, a form bean to have a session scope (as I did in the > > struts-config.xml), when will it be destroyed ? > > > > I suppose the form bean is created the first time I use a jsp:useBean tag > > in my jsp file, isn't it ? > > > > (for example: <jsp:useBean id="searchbydateform" scope="session" > > class="be.stluc.info.struts.SearchByDateForm"/>) > > > > Finally, what could be the reasons, that some of my Action classes see >(can > > use their values) some session beans, while others don't ? > > > > Thanx for having taken the time to read me :) > > > > Friendly Regards, > > Slimane > > > > At 12:11 15/03/2002 +0100, you wrote: > > >Hi, > > > > > >I have 3 form beans. Each of them have a session scope defined in the > > >struts-config.xml. > > > > > >Here's the config for one of them: > > >> <action path="/piechart" > > >> type="be.stluc.info.struts.PieChartAction" > > >> name="piechartform" > > >> scope="session"> > > > > > >When I try to access them in one of my Action class, I don't have any >problem. > > >But when I try to access them, from one other Action class, then >suddenly, > > >they don't exist anymore. > > > > > >I used the piece of code, Mr Keith Bacon posted in reply of one of my > > >previous mail ( > > > >http://www.mail-archive.com/struts-user@jakarta.apache.org/msg25984.html ) > > > > > >And that so, I saw that one time, my session contains all three form >beans > > >and another time my session contains only one form bean. > > > > > >Here's the code I use in my Action classes: > > > > > >> ParticipantDetailsForm partDetForm = > > >> (ParticipantDetailsForm) > > >> request.getSession().getAttribute("participantdetailsform"); > > > > > >(participantdetailsform is one of the 3 form beans I share in the >session) > > > > > >Could anyone give me pointers where I should look for ? Because, I'm sure > > >it's a stupid mistake but I can't find it :( > > > > > >Thanx in advance. > > > > > >Friendly Regards, > > >Slimane > > > > > > > > >-- > > >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]> > > > > >-- >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]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>