the only reason that I know of which would explain the loss of the form property values is redirecting from action1 to action2, but your action mappings don't show redirect="true".
Are you redirecting by default somehow? I know it is possible for instance with an init-param on your action servlet config in web.xml.
Adam
PS Andrew - limited action chaining isn't that bad. Are you claiming you don't do any at all?
On 11/19/2003 09:55 AM Caroline Lauferon wrote:
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
-- struts 1.1 + tomcat 5.0.12 + java 1.4.2 Linux 2.4.20 RH9
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]