As far as I understand it - the struts framework will set the locale in the
users session to Locale.getDefault() when
1) The session value for locale is not already set
2) The users browser has not sent an Accept-Language header
So - to set a default locale for an application you need to set the default
locale for the application's JVM.
Under JBoss (maybe others) - one JVM is shared across applications. This means
that it is not possible to handle the situation where one struts app needs lang1
as default and one struts app needs lang2 as default.
App1 has the following property files (and should default to english)
app1.properties (in english)
App2 has the following property files (and should default to norwegian)
app2.properties (in norwegian)
System locale is english.
This means that app2 actually defaults to english since system locale is in
english and app2 has an english properties file.
It would be nice to be able to set at struts-config.xml level (perhaps
controller section) an
so that you can override the default locale on a per application basis.
Note - all other locale based stuff is working well - this is just talking about
the initialisation of the session locale based on default locale.