Announcement Announcement Module
No announcement yet.
ThemeChangeInterceptor not getting called Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • ThemeChangeInterceptor not getting called

    Hi there,

    straigt to the problem:

    We were using spring 2.5 and now upgrading to 3.0.5.

    We were using the theming of Spring WebMVC.

    After the switch, the interceptor won't work anymore, though the standard theme always works. We simply cannot change the theme by setting the parameter theme_mode=xyz

    Here's our config file:

    <bean id="themeChangeInterceptor" class="org.springframework.web.servlet.theme.ThemeChangeInterceptor">
    		<property name="paramName" value="theme_mode"></property>
    	<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
    		<property name="interceptors">
    				<ref bean="themeChangeInterceptor"/>
    <bean id="themeSource" class="">
    		<property name="basenamePrefix" value="com.sbxmgmt.vevention.themes."/>
    	<bean id="themeResolver" class="org.springframework.web.servlet.theme.SessionThemeResolver">
    		<property name="defaultThemeName" value="theme"/>
    It won't get into my brain why this doesn't work. As I can see it is exactly the same as the well known tutorial on

    In dispatcerservlet where the interceptors are invoked, the interceptors never "arrive", meaning, the interceptor is not in the list, though it is getting set in AbstractHandlerMapping.

    I appreciate any help!



  • #2
    Hi Folks,

    a programmer found out how to solive this:

    Just replace one line with:

    <property name="order"><value>-1</value></property>

    The problem ist that the framework kicks off two Instances of DefaultAnnotationHandlerMapping.

    I attached the screenshot... the first one has now interceptors, the second one the right one.

    After we set the order to a lower value than 0 it works.

    Why are there two instances? Shouldn't be there just one single bean?

    Thanks ion advance,



    • #3
      Hi Hamb, could you explain it to more how you solved it ,please? I can not see the images clearly( low resulation problem).
      I have exactly the same problem here.