2

Hi We have created a customized interceptor stack called appInterceptorStack and referred it as a <default-interceptor-ref name="appInterceptorStack"/>,

appInterceptorStack -> dont have validation and workflow interceptors attached to them.

But now for a specific action class I need to use validate method so I need validation interceptor

I created a new Interceptor stack with validation and workflow interceptors and referred it from action class. But only the default interceptor stack is getting executed. The changed one is not getting called, Please find the sample code below.

<package name="default" extends="struts-default">
  <interceptor-stack name=”AppStack”>
    <interceptor-ref name="exception"/>
    <interceptor-ref name="alias"/>
    <interceptor-ref name="params"/>
    <interceptor-ref name="servletConfig"/>
    <interceptor-ref name="params"/>
  </interceptor-stack>

  <interceptor-stack name=”GuiStack”>
    <interceptor-ref name="exception"/>
    <interceptor-ref name="alias"/>
    <interceptor-ref name="params"/>
    <interceptor-ref name="servletConfig"/>
    <interceptor-ref name="params"/>
    <interceptor-ref name="validation" />
    <interceptor-ref name="workflow" />
  </interceptor-stack>

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

  <action name="test" class="com.jranch.Test">
    <interceptor-ref name="GuiStack”/>
    <result name="input">login.jsp</result>
    <result name="success" type="redirect-action">/secure/home</result>
  </action>
</package> 

Can someone please help me?

Roman C
  • 49,761
  • 33
  • 66
  • 176
Rengasami Ramanujam
  • 1,858
  • 4
  • 19
  • 29
  • FYI: Several of the quotes in your code are the "pretty" quotes you get when you type something in Microsoft Word. I'm not sure if that is limited to your example or if that is present in your real code. – Steven Benitez Jun 06 '11 at 15:10

1 Answers1

1

The configuration looks correct. Can you turn on debug logging for com.opensymphony.

You can then see the interceptors being called in turn. This is the quickest way of seeing what is being called.

Alex Barnes
  • 7,174
  • 1
  • 30
  • 50