I'm having a bad day today, I cannot get Struts 2 using the Convention plugin
to recogize the fact that the package "secure" (which extends
struts-default) uses a different interceptor stack. I know I'm doing
something stupid, but I can't see what. 

When I call an action in the secure namespace the login interceptor fails to
fire and the action executes as "normal". Inspecting the output from
config-browser, I can see that the action I'm calling is located in the
"/secure" namespace, but the interceptor list is the default-struts stack,
not the secureStack.

Have I got my struts.xml correct, or do I need to do anything additional
with annotations to make this work.

Regards

<struts>

    <constant name="struts.enable.DynamicMethodInvocation" value="false" />
    <constant name="struts.devMode" value="true" />
 

        <package name="default" namespace="/" extends="struts-default">
        
        </package>

        <package name="secure" namespace="/secure" extends="struts-default">

        <interceptors>
              <interceptor name="login"
class="com.myApp.interceptors.LoginInterceptor" />
        
          <interceptor-stack name="secureStack">
                <interceptor-ref name="exception"/>
                <interceptor-ref name="alias"/>
                <interceptor-ref name="servletConfig"/>
                <interceptor-ref name="i18n"/>
                <interceptor-ref name="prepare"/>
                <interceptor-ref name="chain"/>
                <interceptor-ref name="debugging"/>
                <interceptor-ref name="scopedModelDriven"/>
                <interceptor-ref name="modelDriven"/>
                <interceptor-ref name="fileUpload"/>
                <interceptor-ref name="checkbox"/>
                <interceptor-ref name="multiselect"/>
                <interceptor-ref name="staticParams"/>
                <interceptor-ref name="actionMappingParams"/>
                <interceptor-ref name="params">
                  dojo\..*,^struts\..*
                </interceptor-ref>
                <interceptor-ref name="login"/>
                <interceptor-ref name="conversionError"/>
                <interceptor-ref name="validation">
                    input,back,cancel,browse
                </interceptor-ref>
                <interceptor-ref name="workflow">
                    input,back,cancel,browse
                </interceptor-ref>
            </interceptor-stack>
        
        </interceptors>
        <default-interceptor-ref name="secureStack"/>
        </package>
</struts>
-- 
View this message in context: 
http://www.nabble.com/Convention-Plugin---Struts-Packages-tp26112472p26112472.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to