You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Chris Pratt <th...@gmail.com> on 2006/11/07 20:10:12 UTC

Losing Locale after Sesion.invalidate()

I am having a strange problem with JSTL locale's after Session.invalidate.
I am using JSTL as the main TagLib with Struts 1.2.9.  So to keep both
systems in sync, I have a servlet filter that executes this code:

  protected void doFilter (HttpServletRequest req,HttpServletResponse
res,FilterChain chain) throws IOException, ServletException {
    Locale locale;
    HttpSession ses = req.getSession();
    String locstr = req.getParameter("locale");
    if(locstr == null) {
      if((locale = (Locale)ses.getAttribute(Globals.LOCALE_KEY)) == null) {
        locale = req.getLocale();
      }
    } else {
      locale = new Locale(locstr);
    }
    if(locale != null) {
      ses.setAttribute(Globals.LOCALE_KEY,locale);
      Config.set(ses,Config.FMT_LOCALE,locale);
    }
    chain.doFilter(req,res);
  } //doFilter

This works great except when, after the LogoutAction calls
Session.invalidate(), I redirect to a "Logout Success" page.  For some
reason that page picks up the French text from the application_fr.properties
resource file for the JSTL tags, but not for the Struts tags.

I have put lots of debugging in the stream and from what I can see, the
Locale is getting set in the filter, but by the time the JSP page is
processed, Config.FMT_LOCALE is null.

Any insights would be greatly appreciated.
  (*Chris*)

RE: Regeneration of last page visited.

Posted by "Nitin M. Mandolkar" <ni...@gmail.com>.
Hi B 

You have keep track of user location on application level. Say suppose
there are some pages in your web application. Like below... 

Apage1
Bpage1-> Bpage2-> Bpage3-> Bpage4 (Web Wizard)
Cpage1-> Cpage2 (Web Wizard)
Dpage1

B & C are your web application wizard, which meets some business
requirements.

Generate unique pageid for each page and store the value in
Application.properties file or your web application conf file. 

Location Pointer in web Application (LPWA)  
------------------------------------------
Before sending response back to user for any particular page in your web
application read the unique pageid for the page and stores it in
persistence media. (Note: Don't forget to consider performance issue
while storing this value to any persistence system)

When user come back again with fresh session, Check for value LPWA and
load web application with LPWA value. 

Here concept is check and store for user location on web application and
load the application with LPWA value. 

Don't forget you have to consider other issue like if the user is going
through some wizards in your web application like in above example B and
C. In this case you have take care of user location and data filled on
previous screens. 


 Nitin 


-----Original Message-----
From: Balwinder [mailto:balwinderk@saigun.com] 
Sent: Wednesday, November 08, 2006 9:49 PM
To: Struts Users Mailing List
Subject: Regeneration of last page visited.

Hi All,

I have a situation, it goes like this; If user is accessing application 
(build on struts) and accidentally he close the browser, on revisit to 
the same application by the same user, user after login should get the 
last page he was working on.

I am working on cookies option but somehow i feel that it is not good, i

need an  alternate solution that deals at server level.

Any help is highly appreciated.

Thanks and Regards,
Balwinder Kumar

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Regeneration of last page visited.

Posted by Balwinder <ba...@saigun.com>.
Hi All,

I have a situation, it goes like this; If user is accessing application 
(build on struts) and accidentally he close the browser, on revisit to 
the same application by the same user, user after login should get the 
last page he was working on.

I am working on cookies option but somehow i feel that it is not good, i 
need an  alternate solution that deals at server level.

Any help is highly appreciated.

Thanks and Regards,
Balwinder Kumar

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Losing Locale after Sesion.invalidate()

Posted by Chris Pratt <th...@gmail.com>.
It's not that I think every application should defalt to English, it's that
I want the default language for MY application to be English.  But to do
that I have to maintain two copies of the same file.  That's bad design.  It
also doesn't appear to understand the concept of layering.  If I ask for a
key that is not in the applications_en.properties file, I would expect it to
automatically check for the key in applications.properties, but that doesn't
appear to be happening.
  (*Chris*)

On 11/9/06, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Chris,
>
> Chris Pratt wrote:
> > 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)
>
> Aah!
>
> That's interesting behavior that is somewhat unexpected in this area
> which is dominated by English-speaking folks. We tend to think that the
> default (non-localized) version of our properties files is (of course!)
> going to be in English. We're pigs.
>
> What is interesting is that most of the time, we expect that the Locale
> will be chosen based upon the user's preferences, and then we try to
> serve them as best we can. The JSTL is, as you say, being extra-helpful
> by finding the "best match" for locale. I wonder if there's a way to
> tell the JSTL what the locale is for the default properties bundles...?
>
> > So I've added an empty application_en.properties file to my project
> > and the problem seems to be closed.
>
> You might also consider using a symlink to point either
> application_en.properties -> application.properties or the other way
> around.
>
> > Thanks for everyone's help.
>
> Always good to get to the botom of a totally weird issue.
>
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD4DBQFFU8TH9CaO5/Lv0PARAl0SAKCCqvWQJsMQScvcqP0nbbU0zwuo3ACXSeUp
> 6Vc00v9ByhqOTZXTTGs/dQ==
> =NrHm
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Losing Locale after Sesion.invalidate()

Posted by Chris Pratt <th...@gmail.com>.
Will it work with JSTL as well?  That would be very nice.
  (*Chris*)

On 11/8/06, Paul Benedict <pb...@apache.org> wrote:
>
> In Struts 1.3.6, I hope to be providing a locale solution for Struts
> which is not tied to the session.
>
> Christopher Schultz wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Chris,
> >
> > 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
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.5 (MingW32)
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >
> > iD8DBQFFUnbW9CaO5/Lv0PARAuaVAJ4rfgOYjpJeGbHe1RVTb46puqBo6wCbBfEj
> > zxU/kl6iBXxctKciirwoUjQ=
> > =A93U
> > -----END PGP SIGNATURE-----
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Losing Locale after Sesion.invalidate()

Posted by Chris Pratt <th...@gmail.com>.
They shouldn't worry about what the default language is, that's my job.  My
application is set up with English and French translations (since it's
targeted at Canada).  But if someone from China comes to my site, I don't
want it to blow up and display nothing, it should default to some language,
in my case, I've chosen to put the English text in my default
application.properties, which should make that the default language of the
site.  Unfortunately JSTL has decided they knew better than I (or they were
trying to save me from myself, or whatever) by making sure that I can't have
a default language on my site without doing extra work, I don't consider
that a benefit?  I still don't see the logic in their decision?
  (*Chris*)

On 11/9/06, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Chris,
>
> Chris Pratt wrote:
> > Woa, that didn't work.
>
> I didn't really expect it to... I would have expected you to get a bunch
> of blank messages (since application_en.properties had nothing in it). I
> don't think that resource bundles "chain" or anything like that.
>
> > According to a comment in the JSTL code, the Java developers don't
> > know what their doing and the JSTL guys decided that the whole idea
> > of a default resource bundle is non-portable.
>
> It's completely portable. What they really mean is that it's not really
> that great of an idea, since there's no indication of what locale the
> "default bundle" actually is. I think it's a necessity, since there's
> always someone who uses a language you've never heard of and so you have
> to display /something/. It may as well be the native language of the
> development team ;)
>
> > Not sure why, but that means that in order for this to work properly
> > in both Struts and JSTL I have to maintain identical
> > application.properties and application_en.properties files.
>
> I recommend the symlink approach. If you use ant for deployment, I think
> you can do this on the disk. Or, you could also just copy
> application.properties to application_en.properties before WARing your
> webapp. That's what I'd do.
>
> No need to maintain more than one copy of the same file in your source
> repo... have your build process take care of that.
>
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFU8Wy9CaO5/Lv0PARAi/ZAJ9YIOGmZNXNrfOc6EVFsa/6V15ScgCgmGS3
> 4KqTSObdfg2+C+JOyr+qBbM=
> =c49X
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Losing Locale after Sesion.invalidate()

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris,

Chris Pratt wrote:
> Woa, that didn't work.

I didn't really expect it to... I would have expected you to get a bunch
of blank messages (since application_en.properties had nothing in it). I
don't think that resource bundles "chain" or anything like that.

> According to a comment in the JSTL code, the Java developers don't
> know what their doing and the JSTL guys decided that the whole idea
> of a default resource bundle is non-portable.

It's completely portable. What they really mean is that it's not really
that great of an idea, since there's no indication of what locale the
"default bundle" actually is. I think it's a necessity, since there's
always someone who uses a language you've never heard of and so you have
to display /something/. It may as well be the native language of the
development team ;)

> Not sure why, but that means that in order for this to work properly
> in both Struts and JSTL I have to maintain identical
> application.properties and application_en.properties files.

I recommend the symlink approach. If you use ant for deployment, I think
you can do this on the disk. Or, you could also just copy
application.properties to application_en.properties before WARing your
webapp. That's what I'd do.

No need to maintain more than one copy of the same file in your source
repo... have your build process take care of that.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFU8Wy9CaO5/Lv0PARAi/ZAJ9YIOGmZNXNrfOc6EVFsa/6V15ScgCgmGS3
4KqTSObdfg2+C+JOyr+qBbM=
=c49X
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Losing Locale after Sesion.invalidate()

Posted by Chris Pratt <th...@gmail.com>.
Woa, that didn't work.  According to a comment in the JSTL code, the Java
developers don't know what their doing and the JSTL guys decided that the
whole idea of a default resource bundle is non-portable.  Not sure why, but
that means that in order for this to work properly in both Struts and JSTL I
have to maintain identical application.properties and
application_en.properties files.  That sounds like a major flaw in the JSTL
design.  Are their any of the JSTL designers around that would like to
enlighten us on why this decision was made?
  (*Chris*)

On 11/9/06, Chris Pratt <th...@gmail.com> wrote:
>
> 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 <th...@gmail.com> 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 < chris@christopherschultz.net> 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: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
>

Re: Losing Locale after Sesion.invalidate()

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris,

Chris Pratt wrote:
> 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)

Aah!

That's interesting behavior that is somewhat unexpected in this area
which is dominated by English-speaking folks. We tend to think that the
default (non-localized) version of our properties files is (of course!)
going to be in English. We're pigs.

What is interesting is that most of the time, we expect that the Locale
will be chosen based upon the user's preferences, and then we try to
serve them as best we can. The JSTL is, as you say, being extra-helpful
by finding the "best match" for locale. I wonder if there's a way to
tell the JSTL what the locale is for the default properties bundles...?

> So I've added an empty application_en.properties file to my project
> and the problem seems to be closed.

You might also consider using a symlink to point either
application_en.properties -> application.properties or the other way around.

> Thanks for everyone's help.

Always good to get to the botom of a totally weird issue.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD4DBQFFU8TH9CaO5/Lv0PARAl0SAKCCqvWQJsMQScvcqP0nbbU0zwuo3ACXSeUp
6Vc00v9ByhqOTZXTTGs/dQ==
=NrHm
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Losing Locale after Sesion.invalidate()

Posted by Chris Pratt <th...@gmail.com>.
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 <th...@gmail.com> 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 <ch...@christopherschultz.net> 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: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>

Re: Losing Locale after Sesion.invalidate()

Posted by Chris Pratt <th...@gmail.com>.
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 <ch...@christopherschultz.net> 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: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Losing Locale after Sesion.invalidate()

Posted by Paul Benedict <pb...@apache.org>.
Struts currently uses the session to store the explicit selected locale. 
It will fallback to the request otherwise.

Christopher Schultz 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: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Losing Locale after Sesion.invalidate()

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Losing Locale after Sesion.invalidate()

Posted by Paul Benedict <pb...@apache.org>.
In Struts 1.3.6, I hope to be providing a locale solution for Struts 
which is not tied to the session.

Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Chris,
> 
> 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
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFFUnbW9CaO5/Lv0PARAuaVAJ4rfgOYjpJeGbHe1RVTb46puqBo6wCbBfEj
> zxU/kl6iBXxctKciirwoUjQ=
> =A93U
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Losing Locale after Sesion.invalidate()

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris,

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFUnbW9CaO5/Lv0PARAuaVAJ4rfgOYjpJeGbHe1RVTb46puqBo6wCbBfEj
zxU/kl6iBXxctKciirwoUjQ=
=A93U
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Losing Locale after Sesion.invalidate()

Posted by Chris Pratt <th...@gmail.com>.
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.
  (*Chris*)

On 11/8/06, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Chris,
>
> Chris Pratt wrote:
> > 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.
>
> Really? So, it's killing your new session? It really ought not to so
> that. Do you think this is a bug in securityfilter?
>
> > 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!
>
> Heh. No love.
>
> > 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??
>
> Okay, now this is making more sense (at least the French part).
>
> Can you clarify which of struts and JSTL goes French on you? Or, do they
> both go French on you?
>
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFUnHV9CaO5/Lv0PARAgFlAJ9QhIeWQhlF1EwKyXyppgoXIWs0ywCgsWaX
> JL5TOD1MS0k4RZaiyHUdlk0=
> =P0na
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Losing Locale after Sesion.invalidate()

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris,

Chris Pratt wrote:
> 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.

Really? So, it's killing your new session? It really ought not to so
that. Do you think this is a bug in securityfilter?

> 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!

Heh. No love.

> 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??

Okay, now this is making more sense (at least the French part).

Can you clarify which of struts and JSTL goes French on you? Or, do they
both go French on you?

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFUnHV9CaO5/Lv0PARAgFlAJ9QhIeWQhlF1EwKyXyppgoXIWs0ywCgsWaX
JL5TOD1MS0k4RZaiyHUdlk0=
=P0na
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Losing Locale after Sesion.invalidate()

Posted by Chris Pratt <th...@gmail.com>.
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 <th...@gmail.com> wrote:
>
> True, this definitely seems more like a JSTL bug/problem than a Struts.
>   (*Chris*)
>
> On 11/7/06, Christopher Schultz < chris@christopherschultz.net> 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: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>

Re: Losing Locale after Sesion.invalidate()

Posted by Chris Pratt <th...@gmail.com>.
True, this definitely seems more like a JSTL bug/problem than a Struts.
  (*Chris*)

On 11/7/06, Christopher Schultz <ch...@christopherschultz.net> 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: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Losing Locale after Sesion.invalidate()

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Losing Locale after Sesion.invalidate()

Posted by Chris Pratt <th...@gmail.com>.
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.

The forward for my logout action includes the attribute forward="true" to
make sure that the request gets run through the filter, and I can see in the
logs that it is.

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.

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 (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).
  (*Chris*)

On 11/7/06, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Chris,
>
> Chris Pratt wrote:
> > No the original problem statement was that the JSTL fmt tags were
> > picking up
> > the French text even though the locale was set to English
>
> Strange. Where is that French locale coming from? Default JDK locale?
> Locale of the web browser's headers? Stray alpha particle?
>
> > the Struts tags are working correctly.
>
> Okay, that makes sooo much more sense.
>
> > The only thing that I can think of is that the
> > Config class isn't working properly in this situation.  With Struts I
> set
> > the Session Attribute directly, with JSTL, I used the Config.set()
> method.
>
> Is this happening in a request that is distinct from the one in which
> you did the invalidate? Or, might you be invalidating the request, and
> then doing a server-side forward to the code that re-sets this locale?
>
> I'm just wondering if it's possible that Config.set grabs the /old/
> session identifier instead of the new one. Is Config.set the recommended
> way to set up data for the JSTL? As I said, I've never used it. Is there
> an alternate way? Say... poking a value directly into the session?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFURP89CaO5/Lv0PARAvGSAKCVIzPWw9HxIMEntWrl8y383UvOqQCgvfKz
> jki/ZLBndeuNBs+2d5hdnRg=
> =LaG0
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Losing Locale after Sesion.invalidate()

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris,

Chris Pratt wrote:
> No the original problem statement was that the JSTL fmt tags were
> picking up
> the French text even though the locale was set to English

Strange. Where is that French locale coming from? Default JDK locale?
Locale of the web browser's headers? Stray alpha particle?

> the Struts tags are working correctly.

Okay, that makes sooo much more sense.

> The only thing that I can think of is that the
> Config class isn't working properly in this situation.  With Struts I set
> the Session Attribute directly, with JSTL, I used the Config.set() method.

Is this happening in a request that is distinct from the one in which
you did the invalidate? Or, might you be invalidating the request, and
then doing a server-side forward to the code that re-sets this locale?

I'm just wondering if it's possible that Config.set grabs the /old/
session identifier instead of the new one. Is Config.set the recommended
way to set up data for the JSTL? As I said, I've never used it. Is there
an alternate way? Say... poking a value directly into the session?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFURP89CaO5/Lv0PARAvGSAKCVIzPWw9HxIMEntWrl8y383UvOqQCgvfKz
jki/ZLBndeuNBs+2d5hdnRg=
=LaG0
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Losing Locale after Sesion.invalidate()

Posted by Chris Pratt <th...@gmail.com>.
No the original problem statement was that the JSTL fmt tags were picking up
the French text even though the locale was set to English, the Struts tags
are working correctly.  The only thing that I can think of is that the
Config class isn't working properly in this situation.  With Struts I set
the Session Attribute directly, with JSTL, I used the Config.set() method.
  (*Chris*)

On 11/7/06, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Chris,
>
> Chris Pratt wrote:
> > Thanks for the reply, and you read it correctly [snip]. Here is the
> > information I'm getting in my logs from all the debugging statements:
> >
> > [10:08:43.179] I18NFilter.doFilter: Processing Request for
> > /canada/logout.jsp
> > [10:08:43.179] I18NFilter.doFilter: Using Locale from Request - en_US
> > [10:08:43.179] I18NFilter.doFilter: Session (abcWr_wP-sVd1_Us3Md7q) is
> new
> > and is valid
> > [10:08:43.179] I18NFilter.doFilter:
> javax.servlet.jsp.jstl.fmt.locale=en_US
>
> Okay, I don't see anything about the struts globals key. Is this because
> you aren't printing it, or because it isn't in the session?
>
>
> > [10:08:43.616] ShowConfigSettingsTag.doStartTag: JSTL Configuration
> > Settings
> > (abcWr_wP-sVd1_Us3Md7q)
> > [10:08:43.616] ShowConfigSettingsTag.doStartTag:   *
> > javax.servlet.jsp.jstl.fmt.locale null
>
> That doesn't look right... didn't you set the locale in your filter? If
> so, then why is this null?
>
> > [10:08:43.632] ShowConfigSettingsTag.doStartTag: Struts Configuration
> > Settings
> > [10:08:43.632] ShowConfigSettingsTag.doStartTag:   *
> > org.apache.struts.action.LOCALE en_US
>
> That's very odd that the session apparently now contains the locale
> under the struts key, and the JSTL ones is null. What's going on? I
> thought you said that the JSTL stuff was working, but the struts was
> not. This session information seems to disagree.
>
> Your first set of output (from the I18NFilter) agrees with your report
> that struts doesn't work and JSTL does, but the output from the
> ShowConfigSettingsTag is the exact opposite.
>
> Are you sure they are the same session (not sure why they wouldn't be,
> but that could explain something).
>
> > Weird.
>
> Agreed.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFUO0X9CaO5/Lv0PARAuj2AKColl8RxT73qqw6cc3EhHMqj3oM6gCgpcaI
> M9glFqOB6UES817fccQERdw=
> =cSrP
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Losing Locale after Sesion.invalidate()

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris,

Chris Pratt wrote:
> Thanks for the reply, and you read it correctly [snip]. Here is the 
> information I'm getting in my logs from all the debugging statements:
> 
> [10:08:43.179] I18NFilter.doFilter: Processing Request for
> /canada/logout.jsp
> [10:08:43.179] I18NFilter.doFilter: Using Locale from Request - en_US
> [10:08:43.179] I18NFilter.doFilter: Session (abcWr_wP-sVd1_Us3Md7q) is new
> and is valid
> [10:08:43.179] I18NFilter.doFilter: javax.servlet.jsp.jstl.fmt.locale=en_US

Okay, I don't see anything about the struts globals key. Is this because
you aren't printing it, or because it isn't in the session?


> [10:08:43.616] ShowConfigSettingsTag.doStartTag: JSTL Configuration
> Settings
> (abcWr_wP-sVd1_Us3Md7q)
> [10:08:43.616] ShowConfigSettingsTag.doStartTag:   *
> javax.servlet.jsp.jstl.fmt.locale null

That doesn't look right... didn't you set the locale in your filter? If
so, then why is this null?

> [10:08:43.632] ShowConfigSettingsTag.doStartTag: Struts Configuration
> Settings
> [10:08:43.632] ShowConfigSettingsTag.doStartTag:   *
> org.apache.struts.action.LOCALE en_US

That's very odd that the session apparently now contains the locale
under the struts key, and the JSTL ones is null. What's going on? I
thought you said that the JSTL stuff was working, but the struts was
not. This session information seems to disagree.

Your first set of output (from the I18NFilter) agrees with your report
that struts doesn't work and JSTL does, but the output from the
ShowConfigSettingsTag is the exact opposite.

Are you sure they are the same session (not sure why they wouldn't be,
but that could explain something).

> Weird.

Agreed.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFUO0X9CaO5/Lv0PARAuj2AKColl8RxT73qqw6cc3EhHMqj3oM6gCgpcaI
M9glFqOB6UES817fccQERdw=
=cSrP
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Losing Locale after Sesion.invalidate()

Posted by "Jiang, Peiyun " <Pe...@nrc-cnrc.gc.ca>.
Can you invalidate the session and create a new session immediately and set the locale according to the old session?

Peiyun

-----Original Message-----
From: Chris Pratt [mailto:thechrispratt@gmail.com]
Sent: November 7, 2006 2:33 PM
To: Struts Users Mailing List
Subject: Re: Losing Locale after Sesion.invalidate()


Thanks for the reply, and you read it correctly, if there's a locale
parameter, use that if not check the session, otherwise go with the browser
setting.  And yes, I've confirmed that the locale is not null.  Here is the
information I'm getting in my logs from all the debugging statements:

[10:08:43.179] I18NFilter.doFilter: Processing Request for
/canada/logout.jsp
[10:08:43.179] I18NFilter.doFilter: Using Locale from Request - en_US
[10:08:43.179] I18NFilter.doFilter: Session (abcWr_wP-sVd1_Us3Md7q) is new
and is valid
[10:08:43.179] I18NFilter.doFilter: javax.servlet.jsp.jstl.fmt.locale=en_US
[10:08:43.616] ShowConfigSettingsTag.doStartTag: JSTL Configuration Settings
(abcWr_wP-sVd1_Us3Md7q)
[10:08:43.616] ShowConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.fmt.locale null
[10:08:43.632] ShowConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.fmt.fallbackLocale null
[10:08:43.632] ShowConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.fmt.localizationContext
com.vsp.canada.resources.application
[10:08:43.632] ShowConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.fmt.timeZone null
[10:08:43.632] ShowConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.sql.dataSource null
[10:08:43.632] ShowConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.sql.maxRows null
[10:08:43.632] ShowConfigSettingsTag.doStartTag: Struts Configuration
Settings
[10:08:43.632] ShowConfigSettingsTag.doStartTag:   *
org.apache.struts.action.LOCALE en_US

As you can see in the I18NFilter output that it has decided to use the
locale from the request (i.e. the user's browser setting) and that it has a
new valid session.  Then I added a Custom Tag that just dumps a bunch of
information to the logs (the ShowConfigSettingsTag) and all the JSTL
settings are null, but the Struts locale seems fine???  Weird.
  (*Chris*)

On 11/7/06, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Chris,
>
> Chris Pratt wrote:
> > I am having a strange problem with JSTL locale's after
> Session.invalidate.
> > I am using JSTL as the main TagLib with Struts 1.2.9.  So to keep both
> > systems in sync, I have a servlet filter that executes this code:
>
> [snip]
>
> >    if(locstr == null) {
> >      if((locale = (Locale)ses.getAttribute(Globals.LOCALE_KEY)) == null)
> {
> >        locale = req.getLocale();
> >      }
> >    } else {
> >      locale = new Locale(locstr);
> >    }
>
> An I reading this right? You have an optional request parameter called
> "locale" that you can use to set the locale to something specific. If
> that parameter is not found, then you check the session for Struts's
> locale. (Note that the session has just been invalidated, so this is
> likely to return null in this). If struts doesn't have one, then you use
> the locale of the request (presumably from the client's provided headers).
>
> >    if(locale != null) {
> >      ses.setAttribute(Globals.LOCALE_KEY,locale);
> >      Config.set(ses,Config.FMT_LOCALE,locale);
> >    }
> >    chain.doFilter(req,res);
>
> It looks like that ought to do it. Are you sure you aren't ending up
> with a NULL locale object in this code?
>
> > This works great except when, after the LogoutAction calls
> > Session.invalidate(), I redirect to a "Logout Success" page.  For some
> > reason that page picks up the French text from the
> > application_fr.properties
> > resource file for the JSTL tags, but not for the Struts tags.
>
> That suggests that Globals.LOCALE_KEY isn't set properly. Can you dump
> out the contents of the session in various places? For instance, what
> does the session contain both before and after this call:
>
> chain.doFilter(req, res);
>
> I haven't used the JSTL before... I assume Config.set(ses, foo, bar)
> basically does ses.setAttribute(foo, bar), eh?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFUN129CaO5/Lv0PARAnwfAKCVnQ0fabblJ5jrSjYAeiqS9v8x5gCfd2M9
> p9uCdcUZiP1W47nIhMVuvJ4=
> =LPOU
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Losing Locale after Sesion.invalidate()

Posted by "Jiang, Peiyun " <Pe...@nrc-cnrc.gc.ca>.
Just wonder if after a session is invalidated, STRUTS, not the SERVLET container, creates a new session even before the request is forwarded to the JSP. If this is true, the browser setting is not involved. Of course, many settings would be null. Just a guess.

Peiyun

-----Original Message-----
From: Chris Pratt [mailto:thechrispratt@gmail.com]
Sent: November 7, 2006 2:33 PM
To: Struts Users Mailing List
Subject: Re: Losing Locale after Sesion.invalidate()


Thanks for the reply, and you read it correctly, if there's a locale
parameter, use that if not check the session, otherwise go with the browser
setting.  And yes, I've confirmed that the locale is not null.  Here is the
information I'm getting in my logs from all the debugging statements:

[10:08:43.179] I18NFilter.doFilter: Processing Request for
/canada/logout.jsp
[10:08:43.179] I18NFilter.doFilter: Using Locale from Request - en_US
[10:08:43.179] I18NFilter.doFilter: Session (abcWr_wP-sVd1_Us3Md7q) is new
and is valid
[10:08:43.179] I18NFilter.doFilter: javax.servlet.jsp.jstl.fmt.locale=en_US
[10:08:43.616] ShowConfigSettingsTag.doStartTag: JSTL Configuration Settings
(abcWr_wP-sVd1_Us3Md7q)
[10:08:43.616] ShowConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.fmt.locale null
[10:08:43.632] ShowConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.fmt.fallbackLocale null
[10:08:43.632] ShowConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.fmt.localizationContext
com.vsp.canada.resources.application
[10:08:43.632] ShowConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.fmt.timeZone null
[10:08:43.632] ShowConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.sql.dataSource null
[10:08:43.632] ShowConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.sql.maxRows null
[10:08:43.632] ShowConfigSettingsTag.doStartTag: Struts Configuration
Settings
[10:08:43.632] ShowConfigSettingsTag.doStartTag:   *
org.apache.struts.action.LOCALE en_US

As you can see in the I18NFilter output that it has decided to use the
locale from the request (i.e. the user's browser setting) and that it has a
new valid session.  Then I added a Custom Tag that just dumps a bunch of
information to the logs (the ShowConfigSettingsTag) and all the JSTL
settings are null, but the Struts locale seems fine???  Weird.
  (*Chris*)

On 11/7/06, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Chris,
>
> Chris Pratt wrote:
> > I am having a strange problem with JSTL locale's after
> Session.invalidate.
> > I am using JSTL as the main TagLib with Struts 1.2.9.  So to keep both
> > systems in sync, I have a servlet filter that executes this code:
>
> [snip]
>
> >    if(locstr == null) {
> >      if((locale = (Locale)ses.getAttribute(Globals.LOCALE_KEY)) == null)
> {
> >        locale = req.getLocale();
> >      }
> >    } else {
> >      locale = new Locale(locstr);
> >    }
>
> An I reading this right? You have an optional request parameter called
> "locale" that you can use to set the locale to something specific. If
> that parameter is not found, then you check the session for Struts's
> locale. (Note that the session has just been invalidated, so this is
> likely to return null in this). If struts doesn't have one, then you use
> the locale of the request (presumably from the client's provided headers).
>
> >    if(locale != null) {
> >      ses.setAttribute(Globals.LOCALE_KEY,locale);
> >      Config.set(ses,Config.FMT_LOCALE,locale);
> >    }
> >    chain.doFilter(req,res);
>
> It looks like that ought to do it. Are you sure you aren't ending up
> with a NULL locale object in this code?
>
> > This works great except when, after the LogoutAction calls
> > Session.invalidate(), I redirect to a "Logout Success" page.  For some
> > reason that page picks up the French text from the
> > application_fr.properties
> > resource file for the JSTL tags, but not for the Struts tags.
>
> That suggests that Globals.LOCALE_KEY isn't set properly. Can you dump
> out the contents of the session in various places? For instance, what
> does the session contain both before and after this call:
>
> chain.doFilter(req, res);
>
> I haven't used the JSTL before... I assume Config.set(ses, foo, bar)
> basically does ses.setAttribute(foo, bar), eh?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFUN129CaO5/Lv0PARAnwfAKCVnQ0fabblJ5jrSjYAeiqS9v8x5gCfd2M9
> p9uCdcUZiP1W47nIhMVuvJ4=
> =LPOU
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Losing Locale after Sesion.invalidate()

Posted by Chris Pratt <th...@gmail.com>.
Thanks for the reply, and you read it correctly, if there's a locale
parameter, use that if not check the session, otherwise go with the browser
setting.  And yes, I've confirmed that the locale is not null.  Here is the
information I'm getting in my logs from all the debugging statements:

[10:08:43.179] I18NFilter.doFilter: Processing Request for
/canada/logout.jsp
[10:08:43.179] I18NFilter.doFilter: Using Locale from Request - en_US
[10:08:43.179] I18NFilter.doFilter: Session (abcWr_wP-sVd1_Us3Md7q) is new
and is valid
[10:08:43.179] I18NFilter.doFilter: javax.servlet.jsp.jstl.fmt.locale=en_US
[10:08:43.616] ShowConfigSettingsTag.doStartTag: JSTL Configuration Settings
(abcWr_wP-sVd1_Us3Md7q)
[10:08:43.616] ShowConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.fmt.locale null
[10:08:43.632] ShowConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.fmt.fallbackLocale null
[10:08:43.632] ShowConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.fmt.localizationContext
com.vsp.canada.resources.application
[10:08:43.632] ShowConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.fmt.timeZone null
[10:08:43.632] ShowConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.sql.dataSource null
[10:08:43.632] ShowConfigSettingsTag.doStartTag:   *
javax.servlet.jsp.jstl.sql.maxRows null
[10:08:43.632] ShowConfigSettingsTag.doStartTag: Struts Configuration
Settings
[10:08:43.632] ShowConfigSettingsTag.doStartTag:   *
org.apache.struts.action.LOCALE en_US

As you can see in the I18NFilter output that it has decided to use the
locale from the request (i.e. the user's browser setting) and that it has a
new valid session.  Then I added a Custom Tag that just dumps a bunch of
information to the logs (the ShowConfigSettingsTag) and all the JSTL
settings are null, but the Struts locale seems fine???  Weird.
  (*Chris*)

On 11/7/06, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Chris,
>
> Chris Pratt wrote:
> > I am having a strange problem with JSTL locale's after
> Session.invalidate.
> > I am using JSTL as the main TagLib with Struts 1.2.9.  So to keep both
> > systems in sync, I have a servlet filter that executes this code:
>
> [snip]
>
> >    if(locstr == null) {
> >      if((locale = (Locale)ses.getAttribute(Globals.LOCALE_KEY)) == null)
> {
> >        locale = req.getLocale();
> >      }
> >    } else {
> >      locale = new Locale(locstr);
> >    }
>
> An I reading this right? You have an optional request parameter called
> "locale" that you can use to set the locale to something specific. If
> that parameter is not found, then you check the session for Struts's
> locale. (Note that the session has just been invalidated, so this is
> likely to return null in this). If struts doesn't have one, then you use
> the locale of the request (presumably from the client's provided headers).
>
> >    if(locale != null) {
> >      ses.setAttribute(Globals.LOCALE_KEY,locale);
> >      Config.set(ses,Config.FMT_LOCALE,locale);
> >    }
> >    chain.doFilter(req,res);
>
> It looks like that ought to do it. Are you sure you aren't ending up
> with a NULL locale object in this code?
>
> > This works great except when, after the LogoutAction calls
> > Session.invalidate(), I redirect to a "Logout Success" page.  For some
> > reason that page picks up the French text from the
> > application_fr.properties
> > resource file for the JSTL tags, but not for the Struts tags.
>
> That suggests that Globals.LOCALE_KEY isn't set properly. Can you dump
> out the contents of the session in various places? For instance, what
> does the session contain both before and after this call:
>
> chain.doFilter(req, res);
>
> I haven't used the JSTL before... I assume Config.set(ses, foo, bar)
> basically does ses.setAttribute(foo, bar), eh?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFUN129CaO5/Lv0PARAnwfAKCVnQ0fabblJ5jrSjYAeiqS9v8x5gCfd2M9
> p9uCdcUZiP1W47nIhMVuvJ4=
> =LPOU
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

RE: Losing Locale after Sesion.invalidate()

Posted by "Jiang, Peiyun " <Pe...@nrc-cnrc.gc.ca>.
I use the following code in JSPs to debug:

context is PageContext:		
Enumeration eSession = context.getAttributeNamesInScope(context.SESSION_SCOPE);
if (eSession != null) {
    while (eSession.hasMoreElements()) {
	 String sessionName = (String) eSession.nextElement();
	 Object sessionValue = context.getAttribute(sessionName, context.SESSION_SCOPE);
	 if (sessionValue != null) {
		if (SystemConfig.loggingEnabled() && logger.isDebugEnabled()) {
			logger.debug(sessionName + " = " + sessionValue + "(" + sessionValue.getClass().getName() + ")");
		}
	 } else {
		if (SystemConfig.loggingEnabled() && logger.isDebugEnabled()) {
			logger.debug(sessionName + " is null");
		}
	}
   }
}
Print out all attributes before and after session is invalidated. Probably you will see if locale is set properly.

Peiyun

-----Original Message-----
From: Christopher Schultz [mailto:chris@christopherschultz.net]
Sent: November 7, 2006 2:25 PM
To: Struts Users Mailing List
Subject: Re: Losing Locale after Sesion.invalidate()


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris,

Chris Pratt wrote:
> I am having a strange problem with JSTL locale's after Session.invalidate.
> I am using JSTL as the main TagLib with Struts 1.2.9.  So to keep both
> systems in sync, I have a servlet filter that executes this code:

[snip]

>    if(locstr == null) {
>      if((locale = (Locale)ses.getAttribute(Globals.LOCALE_KEY)) == null) {
>        locale = req.getLocale();
>      }
>    } else {
>      locale = new Locale(locstr);
>    }

An I reading this right? You have an optional request parameter called
"locale" that you can use to set the locale to something specific. If
that parameter is not found, then you check the session for Struts's
locale. (Note that the session has just been invalidated, so this is
likely to return null in this). If struts doesn't have one, then you use
the locale of the request (presumably from the client's provided headers).

>    if(locale != null) {
>      ses.setAttribute(Globals.LOCALE_KEY,locale);
>      Config.set(ses,Config.FMT_LOCALE,locale);
>    }
>    chain.doFilter(req,res);

It looks like that ought to do it. Are you sure you aren't ending up
with a NULL locale object in this code?

> This works great except when, after the LogoutAction calls
> Session.invalidate(), I redirect to a "Logout Success" page.  For some
> reason that page picks up the French text from the
> application_fr.properties
> resource file for the JSTL tags, but not for the Struts tags.

That suggests that Globals.LOCALE_KEY isn't set properly. Can you dump
out the contents of the session in various places? For instance, what
does the session contain both before and after this call:

chain.doFilter(req, res);

I haven't used the JSTL before... I assume Config.set(ses, foo, bar)
basically does ses.setAttribute(foo, bar), eh?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFUN129CaO5/Lv0PARAnwfAKCVnQ0fabblJ5jrSjYAeiqS9v8x5gCfd2M9
p9uCdcUZiP1W47nIhMVuvJ4=
=LPOU
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Losing Locale after Sesion.invalidate()

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris,

Chris Pratt wrote:
> I am having a strange problem with JSTL locale's after Session.invalidate.
> I am using JSTL as the main TagLib with Struts 1.2.9.  So to keep both
> systems in sync, I have a servlet filter that executes this code:

[snip]

>    if(locstr == null) {
>      if((locale = (Locale)ses.getAttribute(Globals.LOCALE_KEY)) == null) {
>        locale = req.getLocale();
>      }
>    } else {
>      locale = new Locale(locstr);
>    }

An I reading this right? You have an optional request parameter called
"locale" that you can use to set the locale to something specific. If
that parameter is not found, then you check the session for Struts's
locale. (Note that the session has just been invalidated, so this is
likely to return null in this). If struts doesn't have one, then you use
the locale of the request (presumably from the client's provided headers).

>    if(locale != null) {
>      ses.setAttribute(Globals.LOCALE_KEY,locale);
>      Config.set(ses,Config.FMT_LOCALE,locale);
>    }
>    chain.doFilter(req,res);

It looks like that ought to do it. Are you sure you aren't ending up
with a NULL locale object in this code?

> This works great except when, after the LogoutAction calls
> Session.invalidate(), I redirect to a "Logout Success" page.  For some
> reason that page picks up the French text from the
> application_fr.properties
> resource file for the JSTL tags, but not for the Struts tags.

That suggests that Globals.LOCALE_KEY isn't set properly. Can you dump
out the contents of the session in various places? For instance, what
does the session contain both before and after this call:

chain.doFilter(req, res);

I haven't used the JSTL before... I assume Config.set(ses, foo, bar)
basically does ses.setAttribute(foo, bar), eh?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFUN129CaO5/Lv0PARAnwfAKCVnQ0fabblJ5jrSjYAeiqS9v8x5gCfd2M9
p9uCdcUZiP1W47nIhMVuvJ4=
=LPOU
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org