title: In Spring MVC 3 local is not getting changed when clicking local changing link
body: <p>I have set up i18n to my Spring MVC project . The language is not changing when I click  on the link:</p>
  
  <pre><code>&lt;a href="?lang=hi"&gt;Hindi&lt;/a&gt;
  &lt;a href="?lang=en"&gt;English&lt;/a&gt;
  </code></pre>
  
  <p>controller-servlet.xml</p>
  
  <pre><code>    &lt;mvc:annotation-driven/&gt; 
      &lt;context:component-scan base-package="com.avvas.search.controller" /&gt;
  
      &lt;bean class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping" /&gt;
  
      &lt;bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"&gt;
          &lt;property name="basename" value="classpath:resources/messages" /&gt;
          &lt;property name="defaultEncoding" value="UTF-8"/&gt;
          &lt;property name="cacheSeconds" value="0" /&gt;
      &lt;/bean&gt;
  
      &lt;bean id="localeChangeInterceptor"
          class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"&gt;
          &lt;property name="paramName" value="lang" /&gt;
      &lt;/bean&gt;
  
      &lt;bean id="localeResolver"
          class="org.springframework.web.servlet.i18n.CookieLocaleResolver"&gt;
          &lt;property name="defaultLocale" value="en"/&gt;
      &lt;/bean&gt;
  
      &lt;bean id="handlerMapping"
          class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"&gt;
          &lt;property name="interceptors"&gt;
              &lt;ref bean="localeChangeInterceptor" /&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  
      &lt;bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
          &lt;property name="viewClass" value="org.springframework.web.servlet.view.JstlView" /&gt;
          &lt;property name="prefix" value="/WEB-INF/pages/" /&gt;
          &lt;property name="suffix" value=".jsp" /&gt;
      &lt;/bean&gt;
  
      &lt;mvc:resources mapping="/css/**" location="/css/" /&gt;
      &lt;mvc:resources mapping="/javascript/**" location="/javascript/" /&gt;
  </code></pre>
  
  <p>local changing links:</p>
  
  <pre><code>&lt;a href="?lang=hi"&gt;Hindi&lt;/a&gt;
  &lt;a href="?lang=en"&gt;English&lt;/a&gt;
  </code></pre>
  
  <p>The issue is that when i click on hindi the page should be displayed in Hindi language, Language is not getting changed. However i changed default language to hindi <code>&lt;property name="defaultLocale" value="hi"/&gt;</code> then it is taking local as hindi but when i click on english local change link the local is not getting changed.</p>