struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gamble, Wesley (WG10)" <W...@tmw.com>
Subject How to force a default locale in Struts2?
Date Mon, 09 Jun 2008 20:44:25 GMT
All,

 

Tomcat 6.0

Struts 2.0.11.1

Tiles 2.0.6

 

I've successfully implemented locale specific properties in one of my
JSPs, and I can successfully get the alternate locale by passing
"request_locale="fr" in my request like so:

 

http://localhost:8080/ApplicantTracking/applicationStart.action?request_
locale=fr

 

So I know that I can switch back to English by doing:

 

http://localhost:8080/ApplicantTracking/applicationStart.action?request_
locale=en

 

What confuses me, however, is if I restart Tomcat and ask for the URL
(notice no request_locale parameter):

 

http://localhost:8080/ApplicantTracking/applicationStart.action

 

and the last time I looked at this page it was in French, I will get the
French version even though I haven't provided a request_locale
parameter.

 

I would think that I would get the English version, since the "regular"
properties file (ApplicationStartAction.properties) is in English.

 

My English properties file is ApplicationStartAction.properties

My French properties file is ApplicationStartAction_fr.properties

 

Is the request_locale stored in a cookie or something?  Why does the
choice of French locale appear to persist across reboots of Tomcat even
though I ask for the page without locale specificity?

 

Thanks,

Wes

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message