Announcement Announcement Module
No announcement yet.
themeChangeInterceptor does not work with <mvc:annotation-driven /> in spring mvc Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • themeChangeInterceptor does not work with <mvc:annotation-driven /> in spring mvc

    Hi ,
    I am New to spring and Spring MVC .I am trying to develop a sipme Web app where user can add update and delete contacts.
    i was trying to use theme on one Page,but i am facing some issues.
    My page has 3 links Default,black and blue and depending upon the link user clicks bgcolor should change.
    its loading the default theme but not loading theme on change of theme.
    I have attached the files and read me file .
    I am using STS IDE.


  • #2
    This question has been answered before.

    You are using the mvc namespace to configure spring mvc and as such you also have to use the namespace to configure the interceptor. How to do that is explained in the reference guide.


    • #3
      Hi Marten,
      I hope you are doing good.
      Thanks for your reply.
      i removed the following entry from mvc-dispatcher-servlet.xml
      <bean id="handlerMapping"
      class="org.springframework.web.servlet.mvc.annotat ion.DefaultAnnotationHandlerMapping">
      <property name="interceptors">

      <ref bean="themeChangeInterceptor" />
      i added the following entry in mvc-dispatcher-servlet.xml
      Added :

      <bean id="themeChangeInterceptor" class="org.springframework.web.servlet.theme.Theme ChangeInterceptor">
      <property name="paramName" value="theme" />

      It worked.thanks again.