title: Spring MVC the default Locale and Locale change doesn't work
body: <p>I am a new Spring developer tried to develop sample web app with two languages support.I want to set the default locale to Arabic language and change the locale when the user clicks the desired language in JSP page.</p>
  
  <p>Here is my mvc-dispatcher-servlet.xml,</p>
  
  <pre><code>&lt;!-- Enables the Spring MVC @Controller programming model --&gt;
  &lt;mvc:annotation-driven/&gt;
  
  &lt;!-- Handles HTTP GET requests for /resources/** by efficiently serving 
      up static resources in the ${webappRoot}/resources directory --&gt;
  &lt;mvc:resources mapping="/resources/**" location="/resources/" /&gt;
  &lt;context:component-scan base-package="com.benchmark.ushers.presentation.controller"/&gt;
  
  &lt;bean id="internalResourceResolver"
        class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
      &lt;property name="prefix" value="/WEB-INF/pages/"/&gt;
      &lt;property name="suffix" value=".jsp"/&gt;
  &lt;/bean&gt;
  
  &lt;!-- resource bundle  configuration--&gt;
  &lt;bean id="messageSource"
      class="org.springframework.context.support.ReloadableResourceBundleMessageSource"&gt;
      &lt;property name="basename" value="classpath:locale/messages" /&gt;
      &lt;property name="fallbackToSystemLocale" value="false"/&gt;
      &lt;property name="defaultEncoding" value="UTF-8"/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="localeResolver"
      class="org.springframework.web.servlet.i18n.CookieLocaleResolver"&gt;
      &lt;property name="defaultLocale" value="ar" /&gt;
  &lt;/bean&gt;
  
  &lt;mvc:interceptors&gt;  
      &lt;bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"&gt;
            &lt;property name="paramName" value="lang"&gt;&lt;/property&gt;
      &lt;/bean&gt;
  &lt;/mvc:interceptors&gt;
  &lt;!-- end of resource bundle  configuration--&gt;
  </code></pre>
  
  <p>And my JSP page as below,</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%&gt;
  &lt;%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%&gt;
  &lt;%@taglib uri="http://www.springframework.org/tags" prefix="spring"%&gt;
  &lt;tiles:insertDefinition name="defaultTemplate"&gt;
   &lt;tiles:putAttribute name="body"&gt;
  
  
  
    &lt;div class="body"&gt;
     &lt;h1&gt;Ushers&lt;/h1&gt;
  
     lang : &lt;a href="?lang=en"&gt;English&lt;/a&gt; | &lt;a
      href="?lang=ar"&gt;Arabic&lt;/a&gt;
  
     &lt;h3&gt;
      welcome.springmvc :
      &lt;spring:message code="footer.content" text="default text" /&gt;
     &lt;/h3&gt;
     
     &lt;h3&gt;
      hello :
      &lt;spring:message code="footer.hello" text="default text" /&gt;
     &lt;/h3&gt;
  
  
    &lt;/div&gt;
  
  
  
   &lt;/tiles:putAttribute&gt;
  &lt;/tiles:insertDefinition&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I do not know what is wrong in my code while the only displayed the English text only.</p>