I think we are OK on this, as I can see from the example that the default
stack is included. So it would work like this.
Initially I did not include the default which is why it was not working.
Although the docs are a bit vague on how the store should be used,
including the default is required.
<action name="HelloWorld1"
class="org.apache.struts.example.HelloWorld1">
<interceptor-ref name="default"/>
<interceptor-ref name="store">
<param name="operationMode">AUTOMATIC</param>
</interceptor-ref>
<result type="redirectAction">HelloWorld2</result>
</action>
On 6 March 2016 at 12:23, Lukasz Lenart <[email protected]> wrote:
> 2016-03-06 12:48 GMT+01:00 Greg Huber <[email protected]>:
> > In DefaultConfiguration.buildFullActionConfig(..) it checks for the
> > interceptors that were added and if it does not find any it adds the
> > getFullDefaultInterceptorRef() which in my case is myStack.
> >
> > I guess the question is whether adding the message store interceptor ever
> > included the default-interceptor-ref? The code suggests that adding
> > myStack is now required (unless catered for elsewhere).
>
> Nope and it was that way from the very beginning, my refactoring
> didn't change that. I was debugging it early and using just
> MessageStoreInterceptor (with createSession interceptor) shows only
> those two interceptors in scope of the action.
>
> > List<InterceptorMapping> interceptors = new
> > ArrayList<>(baseConfig.getInterceptors());
> > if (interceptors.size() <= 0) {
> > String defaultInterceptorRefName =
> > packageContext.getFullDefaultInterceptorRef();
> > if (defaultInterceptorRefName != null) {
> >
> > interceptors.addAll(InterceptorBuilder.constructInterceptorReference(new
> > PackageConfig.Builder(packageContext), defaultInterceptorRefName,
> > new LinkedHashMap<String, String>(),
> > packageContext.getLocation(), objectFactory));
> > }
> > }
>
> Yap, default-interceptor-ref will be used if no other stack was
> defined for an action.
>
>
> Regards
> --
> Ćukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>