This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
In my test project, I have two resource bundles: messages.properties (german) and messages_en.properties. The german version is intended to be the default.
I can access them in my controller like this:
Both when called from IE and from Firefox, this results in the same message (german). The request Locale is the same ("de_DE" when printed as request.getLocale().toString()), but I suppose that doesn't matter here since getBundle(name) uses the default (server) locale, right?
When called from IE, this displays the german message, but when called from Firefox, this displays the english message. The request locale is the same for both browsers ("de_DE"). Why does the <fmt:bundle> tag get the wrong message bundle?
If I explicitely set the locale in the JSP with
then I get the correct message in Firefox too, but I don't understand why I need to do this (and if its the correct thing to do). I would have thought that the <fmt:bundle> tag uses something like getResourceBundle(name, locale) with the request locale, but apparently that's not what happens..
subject: <fmt:bundle> defaults to english (in firefox)?