Any given action can create an "ad-hoc" interceptor stack

  <action name="login"  class="tutorial.Login">

       <interceptor-ref name="timer"/>
       <interceptor-ref name="logger"/>
       <interceptor-ref name="default-stack"/>

        <result name="input">login.jsp</result>
        <result type="redirect-action">/secure/home</result>
  </action>

Or, you can created your own named stacks and even declare  a new
default interceptor stack for a package

<package name="default" extends="struts-default" >
  <interceptors>
       <interceptor-stack name="myStack">
          <interceptor-ref name="timer"/>
          <interceptor-ref name="logger"/>
        <interceptor-ref name="default-stack"/>
       </interceptor-stack>
  </interceptors>

 <default-interceptor-ref name="myStack"/>

 <action name="login"  class="tutorial.Login">
        <result name="input">login.jsp</result>
        <result type="redirect-action">/secure/home</result>
  </action>

</package>

Packages can extend other packages. If all the other packages in your
application extend "default", then they will all inherit the new
default interceptor.

See also the secton on Configuring Interceptors.

* http://cwiki.apache.org/WW/interceptors.html

And the struts-default package, that is automatically included with
every application.

* http://cwiki.apache.org/WW/struts-defaultxml.html

Anything we do in the struts-default package, you can do in your own packages.

-- HTH, Ted.
* http://www.husted.com/struts/


On 11/3/06, Asish Kr. Samanta <[EMAIL PROTECTED]> wrote:
Hi everybody,

I have written an Interceptor. How do I configure this Interceptor for every
action in struts.xml?

Regards,

Asish

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to