I verified that the same behavior is true on interceptor stacks.  This
seems like a broken feature, a feature that we should discourage anyone
from using.  If I override an interceptor parameter on one action, when
that action runs, the interceptor will likely have different parameters.


On Wed, Jun 26, 2013 at 9:28 AM, Cameron Morris <cmor...@part.net> wrote:

> Thanks Umesh,
> Would the expected behavior change if referencing a stack?
> example:
> <action name="action1" class="example.myAction1">
>  <intercepter-ref name="myStack">
>    <param name="myInterceptor.param">A</param>
>  </intercepter-ref>
> </action>
> <action name="action2" class="example.myAction2">
>  <intercepter-ref name="myStack">
>    <param name="myInterceptor.param">B</param>
>  </intercepter-ref>
> </action>
>
>
> On Wed, Jun 26, 2013 at 8:55 AM, Umesh Awasthi <umeshawas...@gmail.com>wrote:
>
>> You first assumptions is wrong "interceptor was
>> created for each action"
>>
>> Interceptors are not created per action/request but only once and any such
>> action level data changes are not the best place to do that
>>
>> On Wed, Jun 26, 2013 at 8:22 PM, Cameron Morris <cmor...@part.net> wrote:
>>
>> > Hello Strut-ers,
>> >
>> > When I override an interceptor's parameter in several actions, only the
>> > last action's parameters are applied.  (Note I'm not referencing a
>> stack,
>> > but just one interceptor.) I was expecting that a separate interceptor
>> was
>> > created for each action or that the param would be set before the action
>> > was called.  Here is an example:
>> >
>> > <action name="action1" class="example.myAction1">
>> >  <intercepter-ref name="myInterceptor">
>> >    <param name="param">A</param>
>> >  </intercepter-ref>
>> > </action>
>> > <action name="action2" class="example.myAction2">
>> >  <intercepter-ref name="myInterceptor">
>> >    <param name="param">B</param>
>> >  </intercepter-ref>
>> > </action>
>> > <action name="action3" class="example.myAction3">
>> >  <intercepter-ref name="myInterceptor">
>> >    <param name="param">C</param>
>> >  </intercepter-ref>
>> > </action>
>> >
>> > When calling action1, action2, and action3 the "param" of
>> "myInterceptor"
>> > is always C.  Is this expected behavior or is this bug?
>> >
>> > - Cam Morris
>> >
>>
>>
>>
>> --
>> With Regards
>> Umesh Awasthi
>> http://www.travellingrants.com/
>>
>
>

Reply via email to