Announcement Announcement Module
Collapse
No announcement yet.
nesting handlers / global interceptors Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • nesting handlers / global interceptors

    Hi all!

    I want to devide my app into several independent parts and each part should define itīs own handler mapping. The main handler should then delegate to the handlers.

    My current setup:
    app-servlet.xml
    Code:
     
    <bean id="urlMapping" class="org.....SimpleUrlHandlerMapping">
            <property name="mappings">
                <props>
               	  <prop key="/part1/*">part1Mapping</prop>
               	  <prop key="/part2/*">part2Mapping</prop>
                </props>
            </property>
            <property name="interceptors">
            	<list>
            		<ref bean="loginInterceptor"/>
            	</list>
            </property>
    </bean>
    In part1-context.xml I declared the part1Mapping bean:
    Code:
    <bean id="part1Mapping" class="org.....SimpleUrlHandlerMapping">
            <property name="mappings">
                <props>
               	  <prop key="/part1/view.htm">view</prop>
                </props>
            </property>
        </bean>
    Resolving the controller "view" works but the interceptor "loginInterceptor" is only called if the requested url is directly controlled my the the urlMapping, not by the par1Mapping.

    Any ideas how to apply the "loginInterceptor" to all requests? Repeating the interceptor in all mappings is not an option.

    Best regards,

    Roman
Working...
X