struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yanto <>
Subject Re: Interceptor issue in Struts 2.1.6
Date Wed, 17 Jun 2009 03:39:29 GMT
Hi Dave,

after following your note, we are able to run our sample interceptor,
however now we have another issue the sample interceptor will always

since we have the following code in the sample interceptor,
*return* invocation.invoke();

but the sample interceptor will not run, if we are not include this code.



            <interceptor name=*"sample"* class=*

                  <interceptor-stack name=*"MyInterceptorStack"*>

                        <interceptor-ref name=*"prepare"*/>

                        <interceptor-ref name=*"modelDriven"*/>

                        <interceptor-ref name=*"exception"*/>

                        <interceptor-ref name=*"servletConfig"*/>

                        <interceptor-ref name=*"checkbox"*/>

                        <interceptor-ref name=*"params"*/>

                        *<**interceptor-ref** name="**sample"**/>***



             <default-interceptor-ref name=*"MyInterceptorStack"*/>

         <action name=*"authentication"* method=*"authentication"* class=*



Now my action calls going in loop and after added the myinterceptostack

*public* *class* *InterceptorSample* *extends* AbstractInterceptor {


      *public* String intercept(ActionInvocation invocation) *throws*Exception {

            // *TODO* Auto-generated method stub

            System.*out*.println("Testing the interceptor flow from TEST:");

            System.*out*.println("Testing the interceptor flow from TEST

            *return* invocation.invoke();




On Tue, Jun 16, 2009 at 7:32 PM, Dave Newton <> wrote:

> Yanto wrote:
>> <action name="test" class="test.QuizAction">
>>  <interceptor-ref name="sample" />
>> </action>
> This will configure *only* the "sample" interceptor.
> If you specify *any* interceptors on a per-action basis you must configure
> *all* interceptors. This can be done in several ways.
> - specify all interceptors in the action's configuration (you can specify
> interceptor stacks as well as single interceptors)
> - creating a new stack including your custom interceptor and using that
> stack in your action configuration
> - same, but define the new stack and using it as the default stack
> Dave
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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