struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tenchi Masaki <koouy...@gmail.com>
Subject Re: How to setup includes/excludes in Chaining Interceptor
Date Wed, 07 Jan 2015 19:46:22 GMT
Hi Lukasz,

I've tried setting up a new project just to test the chained action and now
I'm a bit confused. It's exactly the same configuration on struts.xml:

<action name="someAction" class="com.examples.SomeAction">
    <interceptor-ref name="basicStack"/>
    <result name="success" type="chain">otherAction</result>
</action>
<action name="otherAction" class="com.examples.OtherAction">
    <interceptor-ref name="chain">
        <param name="includes">prop1,prop2,prop3</param>
    </interceptor-ref>
    <interceptor-ref name="basicStack"/>
    <result name="success">good_result.ftl</result>
</action>

but now I noticed that all the parameters from "SomeAction" are being
copied. I was expecting that only prop1, prop2 and prop3 would be available
for the "OtherAction".
I've tried setting only one prop and also using the expression
${'prop1','prop2','prop3'}.
It's all the same, all properties from SomeAction become available to the
OtherAction.
Is it supposed to be like this? Or am I doing something wrong?

Regards,
Masaki






On Wed, Jan 7, 2015 at 5:56 AM, Lukasz Lenart <lukaszlenart@apache.org>
wrote:

> 2015-01-06 3:47 GMT+01:00 Tenchi Masaki <koouyoku@gmail.com>:
> > Hi,
> >
> > I'm trying to configure a list of parameters to be passed into a chained
> > action, but I can't make it work. I've tried the following configuration
> in
> > my struts.xml:
> >
> > <action name="someAction" class="com.examples.SomeAction">
> >     <interceptor-ref name="basicStack"/>
> >     <result name="success" type="chain">otherAction</result>
> > </action>
> > <action name="otherAction" class="com.examples.OtherAction">
> >     <interceptor-ref name="chain">
> >         <param name="includes">prop1,prop2,prop3</param>
>
> Can you try with just one prop here? or use expression like this:
> ${'prop1','prop2','prop3'} ?
>
>
> Regards
> --
> Ɓukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message