Hi, consider following: 1. jsp with hidden field myField="someValue" 2. post to an action1 -> action1 can read myField and there is someValue in it 3. redirect to another action2 but with redirect="false" in struts-config.xml - it's very important to add redirect="false", it will not create new request so myField=someValue will stay in request 4. in action2 you can read read myField and there is someValue in it
hope that helps. Best greetings, Paweł Wielgus. 2009/2/2 overtakerx <overta...@gmail.com>: > > Hi > > > I was told that I can use html:hidden to pass the data between the two > forms, however after searching around I couldn't find an example on how to > do it, anyone has any idea how to do it or whether it is possible ? > > > > > Paweł Wielgus wrote: >> >> Hi, >> first consider one common form for this two actions maybe they have >> more in common. >> Then You can append this x value to redirection params and set it for >> second action/form, >> last thing I would do would be session. >> >> Best greetings, >> Paweł Wielgus. >> >> 2009/1/30 overtakerx <overta...@gmail.com>: >>> >>> Hi >>> >>> >>> If I have formA.java and formB.java with its corresponding actionA and >>> actionB classes, and inside formA I have a variable x = 10; and I would >>> like >>> to transfer that to formB when actionA forwards to actionB >>> >>> what's the best way to do it besides using http session ? >>> would this be considered as a good struts practice? >>> -- >>> View this message in context: >>> http://www.nabble.com/persisting-data-across-different-form-tp21738852p21738852.html >>> Sent from the Struts - User mailing list archive at Nabble.com. >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >>> For additional commands, e-mail: user-h...@struts.apache.org >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> >> > > -- > View this message in context: > http://www.nabble.com/persisting-data-across-different-form-tp21738852p21782528.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org