Satya <[EMAIL PROTECTED]> wrote:
>Hi,
>      I have to pass parameters from JSP page to an action through another

>action. I am specifying the action tag in the actions.xml but i dont know 

>how to send parameters. 

You'll have to use the Chaining Interceptor. Here's the snippet from the
XWork documentation on the wiki:

ChainingInterceptor

The ChainingInterceptor populates the Action it is being applied to with
the results of the previous action. When actions are chained together, the
action being chained FROM is on the ValueStack when the next action is
called. This means that when the next ActionProxy is executed, the action
that is being chained TO will be placed onto the valuestack, but the old
action will also be there, just down one level. This interceptor works by
traversing the ValueStack to find the parameters of any objects there and
sets them onto the final action. 

Your action element in xwork.xml would look like:

<action name="Foo" class="com.you.SimpleAction">
    <result name="success" type="chain">
         <!-- note the result type of chain above. Next is the actionName
as a parameter -->
        <param name="actionName">Bar</param>
    </result>
    <interceptor-ref name="defaultStack"/>
</action>

In the interceptor reference to "defaultStack" is where the
ChainingInterceptor is defined. 

Now you should be able to access values from the previous action through
the ValueStack and the EL.

/rick




-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to