struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wes Wannemacher (JIRA)" <>
Subject [jira] Commented: (WW-2595) Overriding subset of interceptor params
Date Wed, 15 Apr 2009 18:22:06 GMT


Wes Wannemacher commented on WW-2595:

I guess I'm not sure if this is still an issue... The docs you updated Musachy don't mention
that overriding one parameter on a single interceptor nullifies any other parameters set on
that interceptor. Is that the issue? If so, we can update the docs and maybe set this as 2.2.x.

> Overriding subset of interceptor params
> ---------------------------------------
>                 Key: WW-2595
>                 URL:
>             Project: Struts 2
>          Issue Type: Improvement
>    Affects Versions: 2.0.11
>            Reporter: Jon Wilmoth
>             Fix For: Future
> Trying to override one of three interceptor parameters in an action specific config using
method #2 described in
leaves the params that aren't overridden in the action (but defined in stack definition) null.
 Unfortunately, the other two parameters that I'm not overriding are not being taken from
the default stack definition and are ending up as null on the interceptor.  Below is a sample
action config showing what I'm attempting...
> <package name="packageA"...>
>     <interceptors>
>         <interceptor name="myInterceptor" class="..."/>
>         <interceptor-stack name="myStack">
>             <interceptor-ref name="defaultStack"/>
>             <interceptor-ref name="myInterceptor">
>                 <param name="paramA">defaultValueA</param>
>                 <param name="paramB">defaultValueB</param>
>                 <param name="paramC">defaultValueC</param>
>             </interceptor-ref>
>         </interceptor-stack>
> </package>
> With the following action config, the "myInterceptor" interceptor's  paramA & paramB
are null (causing the interceptor logic to break) and not "defaultValueA" and "defaultValueB"
as expected/desired.
> <package name="packageB" extends="packageA"...>
>     <action name="myAction" class="myActionClass">
>         <interceptor-ref name="myStack">
>             <param name="myInterceptor.paramC">actionSpecificValue</param>
>         </interceptor-ref>
>     </action>
> </package>
> BTW...defining the action with all parameters overridden (see below) works:
> <action name="myAction" class="myActionClass">
>   <interceptor-ref name="myStack">
>      <!--  same value as defined in "myStack" declaration  -->
>      <param name="myInterceptor.paramA">defaultValueA</param>
>      <!--  same value as defined in "myStack" declaration  -->
>      <param name="myInterceptor.paramB">defaultValueB</param>
>      <param name="myInterceptor.paramC">actionSpecificValue</param>
>  </interceptor-ref>
> </action>

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message