You do not have to define a scope for a session scoped form bean - just omit
the scope.  Session scope is the default.


Mark

-----Original Message-----
From: Heather Buch [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 13, 2003 2:42 PM


  Hi,

What is the proper way to do this in struts-config.xml?

Say I have this bean:

<form-bean name="scheduleform"
                   type="mysite.myapp.ScheduleForm"/>

and I want to use it in two actions, editSchedule, and saveSchedule.

On editSchedule, I want scheduleform to be stored in the session.

On saveSchedule, I want scheduleform to be pulled out of the session that
editSchedule stored it in, but I do not need it stored back into the session
after it's used by SaveScheduleAction.

   <action   path="/editSchedule"
             type="mysite.myapp.student.ViewScheduleAction"
             name="scheduleform"
             scope="request"
          validate="true"
             input="/mainmenu.jsp">
    <forward name="success" path="/editschedule.jsp"/>
   </action>

   <action   path="/saveSchedule"
             type="mysite.myapp.student.SaveScheduleAction"
             name="scheduleform"
             scope="request"
          validate="true"
             input="/editschedule.jsp">
    <forward name="success" path="/viewSchedule.do"/>
   </action>

So where do I define the session scope for this form?


Also, is a session-scope form bean an acceptable place to transport 
objects from
one Action to another?

There is more to this story, but I'll explain that after I (hopefully 
:-)) have an answer to this question.

Thanks,

Heather Buch


--
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]>

Reply via email to