OK, I've found the root of one of the two mysteries.  I was using my
I18NFilter (from the original email) and SecurityFilter (
http://securityfilter.sourceforge.net/) and I had SecurityFilter mapped
before I18NFilter in my web.xml.  It seems that the next time SecurityFilter
gets run after a Session.invalidate(), it calls Session.invalidate() itself
which was throwing out the values set by I18NFilter.

Whew, problem solved, right... NOT!!  Now the values are getting set into
the session and are appearing properly when I dump their values using my
Custom tag (See below), but JSTL is still printing out the text in French!

Oh, one other piece of information, I've determined that this only happens
if the Accept-Language headers contains fr as an option, even if it isn't
the preferred language.  If the browser sends "Accept-Language: en-us,en;q=
0.8,fr-ca;q=0.5,fr;q=0.3" I get French text.  If it sends "Accept-Language:
en-us,en;q=0.5" I get English.

I'm totally flabergasted, how can this happen???  Anyone have any ideas??
Thanks.
 (*Chris*)

[15:41:54.118] LogConfigSettingsTag.doStartTag: JSTL Configuration Settings
[15:41:54.118] LogConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.fmt.locale: en_US
[15:41:54.118] LogConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.fmt.fallbackLocale: null
[15:41:54.118] LogConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.fmt.localizationContext:
com.vsp.canada.resources.application
[15:41:54.118] LogConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.fmt.timeZone: null
[15:41:54.134] LogConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.sql.dataSource: null
[15:41:54.134] LogConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.sql.maxRows: null
[15:41:54.134] LogConfigSettingsTag.doStartTag: Struts Configuration
Settings
[15:41:54.134] LogConfigSettingsTag.doStartTag:   *
org.apache.struts.action.LOCALE: en_US (3)
[15:41:54.134] LogConfigSettingsTag.doStartTag: Session Attributes
[15:41:54.134] LogConfigSettingsTag.doStartTag:   *
org.apache.struts.action.LOCALE: en_US
[15:41:54.134] LogConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.fmt.locale: en_US

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

True, this definitely seems more like a JSTL bug/problem than a Struts.
  (*Chris*)

On 11/7/06, Christopher Schultz < [EMAIL PROTECTED]> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Chris,
>
> Chris Pratt wrote:
> > I believe "stray alpha particle" is the most likely answer.  I'm on a
> > US PC, with an English version of Windows XP.  Everything on this
> > machine screams English, but for some reason it's picking the
> > application_fr.properties.
>
> Totally weird.
>
> > As far as I can tell Config is the correct way to set JSTL values and
> > since I passed the same HttpSession instance into the Config.set that
> > I used to set the Struts Global value, I can't see how it would have
> > gotten the old session.
>
> Oh, duh. Yeah, you *do* pass-in that parameter. Are you sure that's what
> you're supposed to do when setting the JSTL locale? It looks about
> right... just making sure.
>
> > I really don't want to have to try and debug into the black box that
> > is Struts, but that's looking more and more likely
>
> I thought struts was working properly, though. Oughtn't you be digging
> through JSTL instead?
>
> > (so much for saving time on this project by using a tried-and-true
> > technology instead of rolling my own like I've always done in the
> > past).
>
> Don't write-off struts just yet. It's the best app framework I've ever
> used, though I've only ever used two: one was home-grown and was
> completely worthless. The other was Turbine which didn't match up with
> the way I see application frameworks as being useful. I actually
> converted a Turbine project to struts (ugh) and I've never looked back.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFURnL9CaO5/Lv0PARAomFAJ4+1eK+AUMrI8LKrpGYl1UGiyCvAACgwNif
> /F/JuuC8/M4mgVqluYOTMIM=
> =zqql
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to