title: Spring MVC 3 Locale changing using a link not working
body: <p>Edit: My Spring framework version 3.0.5</p>
  
  <p>A small issue here, The language is not changing when I click the language changer link.</p>
  
  <p>The language files (messages_xx.properties) are in the classpath i18n directory. The files are:</p>
  
  <pre><code>i18n/messages_en.properties
  i18n/messages_ar.properties
  </code></pre>
  
  <p>Spring Configuration</p>
  
  <pre><code>&lt;!-- Component scanner. This is used to automatically find Spring annotations like @Service and @Repository --&gt;
      &lt;context:component-scan base-package="com.keype" /&gt;
  
      &lt;!-- Annotation driven programming model --&gt;
      &lt;mvc:annotation-driven /&gt;   
      &lt;context:annotation-config /&gt;
      &lt;mvc:resources mapping="/static/**" location="/static/" /&gt;
  
  
      &lt;!-- Session Object Configuration --&gt;
      &lt;bean id="session" class="com.keype.system.Session" scope="session"&gt;
          &lt;aop:scoped-proxy /&gt;
      &lt;/bean&gt;
  
      &lt;!-- The View Resolver --&gt;
      &lt;bean id="viewResolver"
            class="org.springframework.web.servlet.view.InternalResourceViewResolver"
            p:prefix="/WEB-INF/jsp/"
            p:suffix=".jsp"
            /&gt;
  
      &lt;!-- i18n Configuration. Default language is english. Change language using ?language=en --&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.SessionLocaleResolver"&gt;
          &lt;property name="defaultLocale" value="en" /&gt;
      &lt;/bean&gt;
  
      &lt;!-- Message text files. This is set UTF-8 to display Arabic UTF correctly. --&gt;    
      &lt;bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"&gt;
          &lt;property name="basename" value="classpath:i18n/messages" /&gt;
          &lt;property name="defaultEncoding" value="UTF-8"/&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>A section from the JSP Code</p>
  
  <pre><code>&lt;a href="?lang=ar"&gt;&lt;spring:message code="header.arabic" /&gt;&lt;/a&gt; | 
      &lt;a href="?lang=en"&gt;&lt;spring:message code="header.english" /&gt;&lt;/a&gt; 
  </code></pre>
  
  <p>The issue is, when I click the above link to change the language, the locale changing functionality is not working. I tested by changing the "defaultLocate" to "ar" and I'm getting Arabic text.</p>
  
  <p>What could possibly be wrong here? There is nothing in the tomcat log also.</p>