Reputation: 13
I have created an Interceptor and defined it in the default package in my struts.xml. It is working fine in the the default package (extends="struts-default"). I using this action
<package name="default" namespace="/" extends="struts-default">
<!-- Define the custom interceptor -->
<interceptors>
<interceptor name="myauthentication" class="interceptors.AuthenticationInterceptor" />
</interceptors>
<action name="home">
<interceptor-ref name="myauthentication"/>
<result name="success" type="tiles">home-page</result>
</action>
I would like to use the same interceptor in a second package that extends the default package above. It never gets executed. The was copied directly from the action in the default package that it is working in now.
<package name="groups" namespace="/groups" extends="default">
<action name="feed" >
<interceptor-ref name="myauthentication"/>
<result name="success" type="tiles">group-my-feeds</result>
</action>
Upvotes: 0
Views: 12