struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Losing Locale after Sesion.invalidate()
Date Thu, 09 Nov 2006 00:31:18 GMT
Hash: SHA1


Chris Pratt wrote:
> Yes, I'm using mainly JSTL to display data on the page (fmt:message) and
> they're all showing up in French.  I put one bean:message on the page just
> as a test and it is correctly displaying English.

Hmm. It looks like the JSTL improperly detects the locale from the
accept-language header. I assume you aren't mutating that header or
anything like that, eh?

Where does one get a copy of the JSTL tag libraries? Maybe it's time to
look at some of the code used, there.

IIRC, you are determining the locale yourself in your I18NFilter and
attempting to set the locale in the session (for struts) and using the
Config.set thing for the JSTL. I assume you have confirmed that the
locale you are attempting to use is the 'en' locale.

Is there a Config.get()?

Perhaps, after calling Config.set() you could call Config.get() with the
same target object and key, to make sure that it "stuck".

Also, check both the session and whatever Config.get returns /after/ you
call chain.doFilter(). You can see if the JSTL is overriding your
locale-setting sometime during the request.

What happens when you call request.getLocale()? That should give you the
preferred locale, no? What does it give you in these weird cases?

- -chris

Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla -


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

View raw message