tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Siggelkow <>
Subject Using Config.set(session, Config.FMT_LOCALE, locale);
Date Thu, 12 Aug 2004 19:48:15 GMT
I have created a Struts action similar to one suggested by Kris 
Schneider to change the current locale for both Struts and JSTL.

In the action after creating a locale based on user input I make the 
following two calls:

	// reset the Struts locale
         session.setAttribute(Globals.LOCALE_KEY, locale);

         // reset the JSTL locale
         Config.set(session, Config.FMT_LOCALE, locale);

I then redirect to the page where I display some text based on the locale.

The Struts bean:message works perfectly - however, the JSTL fmt:message 
does not work -- by the way, I do have the LocalizationContext pointing 
to my ApplicationResources through the web.xml context-param.

Interestingly enough, if I do use <fmt:setLocale locale="ru"/> on the 
before the <fmt:message key="foo"/> it works!

Does anyone have any ideas on why the Config.set(...) is not working?

Bill Siggelkow

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message