Results 1 to 2 of 2

Thread: Multiple Interceptor

  1. #1
    Join Date
    Jan 2009
    Posts
    1

    Default Multiple Interceptor

    Hi

    I am a newbie to spring.
    The xml file for configuration is
    <bean id="handlerMapping" class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
    ,.....

    <property name="interceptors">
    <list>
    <ref bean="commonInfoInterceptor" />
    <ref bean="TypoInterceptor" />
    </list>
    </property>

    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

  2. #2
    Join Date
    Jan 2009
    Location
    Europe
    Posts
    18

    Default

    Quote Originally Posted by AabhaVarma View Post
    Hi

    I am a newbie to spring.
    The xml file for configuration is
    <bean id="handlerMapping" class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
    ,.....

    <property name="interceptors">
    <list>
    <ref bean="commonInfoInterceptor" />
    <ref bean="TypoInterceptor" />
    </list>
    </property>

    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:
    <bean id="simpleUrlMapping"
    		class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
    		<property name="order">
    			<value>0</value>
    		</property>
    		<property name="mappings">
    			<props>
    				<prop key="/welcome">welcomeController</prop>
    				<prop key="/home">homeController</prop>
    			</props>
    		</property>
    		<property name="interceptors">
    			<list>
    				<ref bean="firstInterceptor" />
    				<ref bean="secondInterceptor" />
    				<ref bean="thirdInterceptor" />
    				
    			</list>
    		</property>
    	</bean>
    it should be work

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •