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
In part1-context.xml I declared the part1Mapping bean: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>
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.Code:<bean id="part1Mapping" class="org.....SimpleUrlHandlerMapping"> <property name="mappings"> <props> <prop key="/part1/view.htm">view</prop> </props> </property> </bean>
Any ideas how to apply the "loginInterceptor" to all requests? Repeating the interceptor in all mappings is not an option.
Best regards,
Roman


Reply With Quote