I don't understand what is happening: I am chaining to Actions that use the
same form input. when i submit the form, Action1 is called, and the form
parameter is well populated. at the end of action1, I make a forward to
Action2. and in Action2, the form is emptied!!???
I don't understand what is happening, and why. the solution I have found is
not to specify a form bean for action2 and get it by
request.getAttribute("MyForm"). i t works, but I would like to understand
why struts creates a new form bean, overriding the existing one.
I hope someone will explain me.

Caroline
PS: here is a snippet of struts-config.xml, Action1.java and Action2.java

<action path="/action1" type="package.Action1" name="MyForm"
scope="request">
   <forward name="ok" path="/action2.do"/>
</action>
 <action path="/action2" type="package.Action2"  name="MyForm"
scope="request"> >
   <forward name="ok" path="nextpage"/>
</action>

/// Action1
MyForm f = (MyForm ) a_form;
s_logger.info("f.getField1() : "+ f.getField1()); // outputs a value

/// Action2
MyForm f = (MyForm ) a_form;
s_logger.info("f.getField1() : "+ f.getField1()); // outputs null


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

Reply via email to