You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Gamble, Wesley (WG10)" <WG...@tmw.com> on 2008/06/10 22:44:27 UTC

RE: Custom interceptor not firing - ANSWER

So the answer to my problem was that I was using Annotation based
actions, and these do not pick up a custom interceptor-stack by default,
unless you place the @ParentPackage annotation on _each_ Action class,
like so:

@ParentPackage(value="ApplicantTracking")

where "ApplicantTracking" is the name of my Struts package.

Thanks for the help,
Wes

-----Original Message-----
From: Gamble, Wesley (WG10) [mailto:WG10@tmw.com] 
Sent: Tuesday, June 10, 2008 1:22 PM
To: Struts Users Mailing List; newton.dave@yahoo.com
Subject: Custom interceptor not firing

All,

I set up a custom interceptor, but it is not being invoked.

As far as I can tell from looking at _Struts 2 in Action_, I constructed
my class correctly.  It is named "CompanyIdentificationInterceptor".

My struts.xml file now has this configuration in it to accommodate this
new interceptor:

<interceptors>
   <interceptor name="companyInterceptor"
class="com.tmw.applicant.tracking.interceptors.CompanyIdentificationInte
rceptor" />
		
     <interceptor-stack name="customStack">	
	  	<interceptor-ref name="companyInterceptor" />		
		<interceptor-ref name="defaultStack" />
     </interceptor-stack>		
</interceptors>
	
<default-interceptor-ref name="customStack" />

Have I missed something? 

Thanks,
Wes

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


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