The easiest way to pass param's to other actions is to give the action a name
in struts-config and set it equal to a class that extends ActionFrom. To
clarify what I am saying, build a class that extends ActionFrom, Declare it in
struts config like so...

<form-beans >
   <form-bean name="YourForm" type="com.yourcompany.struts.form.YourForm" />
</form-beans> 

Then in your action use the form name as the action name attribute like so..


<action name="YourForm" path="/myaction" scope="request"
type="com.yourcompany.struts.action.YourAction" validate="false">
   <forward name="success" path="/test.jsp" />
</action>

In the action class where you will forward from, set your data on the form and
return the forward. When the myaction action runs it will have access to that
form and it's data. The form is also accessible through the struts tags in
your jsp page. Here is the tag ref for that.
http://struts.apache.org/struts-taglib/tagreference-struts-html.html

Bryan LaPlante

---------- Original Message -----------
From: shiiva <[EMAIL PROTECTED]>
To: dev@struts.apache.org
Sent: Tue, 14 Feb 2006 00:21:18 CST
Subject: Passing Parameters to ActionForward from Action

> Hi,
> 
> Can anyone please describe me how to pass parameters from an Action to
corresponding ActionForward.
> 
> Basically, I am having only the jsp name in forward in struts-config.xml.
But, when action is processed, I want to send some parameters to the
corresponding actionforward.
> 
> Can some be help me in explaining how it can be achieved.
> 
> Thanks,
> Shiiva
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.opensymphony.com/thread.jspa?threadID=18280&messageID=35715#35715
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
------- End of Original Message -------

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

Reply via email to