User evnafets over on the JSTL Forums at forum.java.sun.com tracked down the
cause of the problem.  In his words:

The problem is JSTL is being helpful. Perhaps too helpful in this case.
Basically it is looking for an exact match between ResourceBundle and your
Locale settings.
It will look for English first, but only find the default resource bundle.
It will then look for French and find a specific resource bundle for French
language.
Thus JSTL maps itself to the french bundle because it is a more specific
match (despite the fact the preferred language is English)

If you have the JSTL source code, the class in question appears to be
org.apache.taglibs.standard.tag.common.fmt.BundleSupport
Specifically in the method findMatch(String basename, Locale pref)

So I've added an empty application_en.properties file to my project and the
problem seems to be closed.  Thanks for everyone's help.
 (*Chris*)

On 11/8/06, Chris Pratt <[EMAIL PROTECTED]> wrote:

OK, now I'm scared.  It's fixed and I can't figure out why?  Earlier I
made the change to make sure that securityfilter came before I18NFilter in
the chain but the text was still showing up French.  I put a bunch of
debugging code in (over hours and many, many tests) and now I can't
reproduce the problem, even after I've pulled out all my debugging code
(thinking something in there might have had an unanticipated side-effect).
Thanks for everybody's help and I'll definitely let everyone know if I
figure out what I did.
  (*Chris*)

On 11/8/06, Christopher Schultz <[EMAIL PROTECTED]> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Paul,
>
> Paul Benedict wrote:
> > In Struts 1.3.6, I hope to be providing a locale solution for Struts
> > which is not tied to the session.
>
> Does struts rely on the session for locale information? I would have
> expected a null session to result in a call to request.getLocale for
> each request (or, at least, for each time the locale is required).
>
> I don't see why the session should be an absolute requirement. Is that
> currently the case?
>
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFUnt89CaO5/Lv0PARAqqqAJ4ymycIXp1TH8p0r2zz4C+pTHQVkQCcCA3Q
> 7FLW3Y71MyxjvYqRD6xThLg=
> =vwCs
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to