title: How can I set locale for JSP using <fmt:setLocale>?
body: <p>I'm trying to set the local in JSP.</p>
  
  <p>I thought I'd be able to do something like:</p>
  
  <pre><code>&lt;fmt:setLocale value="${param['local']}" scope="session"/&gt;
  </code></pre>
  
  <p><a href="http://java.sun.com/developer/technicalArticles/Intl/MultilingualJSP/index.html" rel="nofollow">Java's own page on the topic</a> seem to say exactly so much.</p>
  
  <p>However, when I go to execute this, I get:</p>
  
  <pre><code>HTTP Status 500 -
  
  type Exception report
  
  message
  
  description The server encountered an internal error () that prevented it from fulfilling this request.
  
  exception
  
  org.apache.jasper.JasperException: /pages/ResourceBundlesJSTL.jsp(11,0) According to TLD or attribute directive in tag file, attribute value does not accept any expressions
   org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
   org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
   org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
   org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1232)
   org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:868)
   org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539)
   org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
   org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)
   org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2434)
   org.apache.jasper.compiler.Node$Root.accept(Node.java:475)
   org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
   org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1787)
   org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:211)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:360)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
   org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:594)
   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:316)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
  note The full stack trace of the root cause is available in the Apache Tomcat/7.0.2 logs.
  
  Apache Tomcat/7.0.2
  </code></pre>
  
  <p>I've also tried</p>
  
  <pre><code>&lt;fmt:setLocale value="&lt;%= param['local'] %&gt;" scope="session"/&gt;
  </code></pre>
  
  <p>and I get the same error.</p>