Ok thanks, never really understood the reasons why adding the default was
required as I always did it, so I now know!

Cheers Greg

On 9 March 2016 at 08:28, Lukasz Lenart <lukaszlen...@apache.org> wrote:

> 2016-03-09 7:47 GMT+01:00 Lukasz Lenart <lukaszlen...@apache.org>:
> >> When I say the default, I mean myStack
> >>
> >> <default-interceptor-ref name="myStack" /> otherwise
> >>
> >> the action I call does not work due to not having gone through any kind
> of
> >> stack, no parameters etc or my ActionPrepareInterceptor not being
> called.
> >>
> >> From the code below, if only store is used, it calls the interceptor and
> >> then invokeActionOnly(); on the class ie execute.
> >>
> >> if (interceptors.hasNext()) {
> >>                 final InterceptorMapping interceptor =
> interceptors.next();
> >>                 String interceptorMsg = "interceptor: " +
> >> interceptor.getName();
> >>                 UtilTimerStack.push(interceptorMsg);
> >>                 try {
> >>                     resultCode =
> >> interceptor.getInterceptor().intercept(DefaultActionInvocation.this);
> >>                 } finally {
> >>                     UtilTimerStack.pop(interceptorMsg);
> >>                 }
> >>             } else {
> >>                 resultCode = invokeActionOnly();
> >>             }
> >
> > Hm.... let me check that
>
> Yes, it's the correct behaviour because you defining an anonymous
> interceptors stack (by setting it up with just one interceptor) so
> there is no "merge" with <default-interceptor-ref/>,
> <default-interceptor-ref/> is used if there is no stack defined for an
> action.
>
>
> Regards
> --
> Ɓukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
> For additional commands, e-mail: dev-h...@struts.apache.org
>
>

Reply via email to