Back Forum Reply New

Multiple Interceptor

Hi

I am a newbie to spring.
The xml file for configuration is
lt;bean id=quot;handlerMappingquot; class=quot;org..web.servlet.handler.Sim  pleuclHandlerMappingquot;gt;
,.....

lt;property name=quot;interceptorsquot;gt;lt;listgt;    lt;ref bean=quot;commonInfoInterceptorquot; /gt;     lt;ref bean=quot;TypoInterceptorquot; /gt;              lt;/listgt;       lt;/propertygt;

these are being referred to a bean that extends
HandlerInterceptorAdapter
The problem is, only one interceptor is being invoked.
I may be missing some configuration.  could anyone direct me to where to debug


Originally Posted by AabhaVarmaHi

I am a newbie to spring.
The xml file for configuration is
lt;bean id=quot;handlerMappingquot; class=quot;org..web.servlet.handler.Sim  pleuclHandlerMappingquot;gt;
,.....

lt;property name=quot;interceptorsquot;gt;lt;listgt;    lt;ref bean=quot;commonInfoInterceptorquot; /gt;     lt;ref bean=quot;TypoInterceptorquot; /gt;              lt;/listgt;       lt;/propertygt;

these are being referred to a bean that extends
HandlerInterceptorAdapter
The problem is, only one interceptor is being invoked.
I may be missing some configuration.  could anyone direct me to where to debug

try something like this:

Code:

lt;bean id=quot;simpleuclMappingquot;
class=quot;org..web.servlet.handler.SimpleuclHandlerMappingquot;gt;
lt;property name=quot;orderquot;gt;
lt;valuegt;0lt;/valuegt;
lt;/propertygt;
lt;property name=quot;mappingsquot;gt;
lt;propsgt;
lt;prop key=quot;/welcomequot;gt;welcomeControllerlt;/propgt;
lt;prop key=quot;/homequot;gt;homeControllerlt;/propgt;
lt;/propsgt;
lt;/propertygt;
lt;property name=quot;interceptorsquot;gt;
lt;listgt;
lt;ref bean=quot;firstInterceptorquot; /gt;
lt;ref bean=quot;secondInterceptorquot; /gt;
lt;ref bean=quot;thirdInterceptorquot; /gt;

lt;/listgt;
lt;/propertygt;
lt;/beangt;
it should be work
¥
Back Forum Reply New