title: Display the locale in a JSTL
body: <p>In a jstl page i want to display the current locale being used to render the page. The page locale is working just fine. When i switch the locale (?lang=nl) the nl resource bundle is used. When is switch back to english (?lang=en) the en resouce bundle is used.</p>
  
  <p>Now i try to display the locale using</p>
  
  <pre><code>&lt;c:out value="${ PageContext.request.locale.language }"/&gt;
  </code></pre>
  
  <p>But this just displays the literal string <code>${ PageContext.request.locale.language }</code></p>
  
  <p>I have tried a lot of samples like. With and without the spaces.</p>
  
  <pre><code>${ pageContext.request.locale.language }
  ${ pageContext.locale }
  ${ pageContext.getLocale }
  ${ requestContext.locale.language }
  ${ request.locale.language }
  </code></pre>
  
  <p>I'm using the spring-mvc with the following configuration</p>
  
  <pre><code>&lt;mvc:interceptors&gt;
      &lt;bean id="localeChangeInterceptor" class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"&gt;
          &lt;property name="paramName" value="lang"/&gt;
      &lt;/bean&gt;
  &lt;/mvc:interceptors&gt;
  
  &lt;bean id="viewResolver" 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/jsp/"/&gt;
      &lt;property name="suffix" value=".jsp"/&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;
  </code></pre>
  
  <p>The code for reproducing this problem can be found on <a href="https://github.com/abroer/jsltSpringLocaleProblem" rel="nofollow">https://github.com/abroer/jsltSpringLocaleProblem</a></p>
  
  <p>Could anyone help me out on this one. Thanks for taking the effort. I really appriciate it.</p>