The thing I do not get to work is to change locale during a session. Once the locale is set, it is set as if it was in application scope. I want users to be able to change language at any point of time during a session. %@ page contentType="text/html" %> <%@ taglib prefix="c" uri="WEB-INF/tags/c.tld" %> <%@ taglib prefix="fmt" uri="WEB-INF/tags/fmt.tld" %> <%-- Set the locale to the selected one, if any. Otherwise, let the <fmt:setBundle> action pick the best one based on the Accept-Language header. --%> <%-- Interpret user's locale choice --%> <c:if test="${param['locale'] != null}"%> <% System.out.println("here"+request.getParameter("locale"));%> <fmt:setLocale value="${param['locale']}" scope="session" /%> </c:if%> <%-- Offer locale choice to user --%> <a href="international.jsp?locale=en-US">USA</a> - <a href="international.jsp?locale=de-DE">Deutschland</a> - <a href="international.jsp?locale=fr-FR">French;</a> <%-- Use URL rewriting to ensure proper session tracking --%> <form method="get" action="<c:url value='/international.jsp' />"> <input type=submit value="Stay in session"> </form> <fmt:bundle basename="LabelsBundle" > <html> <head> <title> <fmt:message key="s0" /> </title> </head> <body bgcolor="white"> <h1> <fmt:message key="s0" /> </h1> </html> </body> </fmt:bundle>
Fixed in JSTL 1.0.3.