Adam Hardy 写道:
Ray on 18/12/07 02:32, wrote:
How can I pass parameters between actions.
For example, there is a parameter "username" in firstAction, and I
want to use this value in secondAction
How can I get the "username" value in the secondAction
There are many ways. It depends heavily whether your 2 actions are
done in one request or 2. And of course, whether you're using Struts1
or 2.
Adam
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I use struts 2
And I succeed to get the right value using "redirect-action" result type
How ever the server print out the message
"Caught QgnlException while setting property'username2' on type
'org.apache.struts2.dispatcher.ServletActionRedirectResult'
ognl.NoSuchProprtyException:org.apche.struts2.dispacher.ServletActionRedirectResult.username2
...."
What's going on?
How can I solve this ?
My configuration in struts.xml like following
<result type="redirect-action">
<param name="actionName">secondAction</param>
<param name="parse">true</param>
<param name='username2'>${username1}</param>
</result>
--
Ray Chen
Email:[EMAIL PROTECTED]
Blog: http://clraychen.blogcn.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]