You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ralf Schneider <ra...@tapfere-schneiderleins.de> on 2004/06/01 12:23:23 UTC
MessageResources Problem in Action
Hi,
I want to access the strings in a resource bundle from within an action. I
have two resource files (ApplicationResources.properties and
ApplicationResources_de.properties) and they are accessed correctly from the
JSP, but not from the action.
When I look at the locale with request.getLocale() in the action I see that it
is set to de_AT. This is what I expected. Unfortunately, the strings are
fetched from ApplicationResources.properties, not from
ApplicationResources_de.properties as they should be.
I use this code to get a string from the resource bundle:
MessageResources messages = getResources (request);
String msg = messages.getMessage("rights.new");
Any ideas what might be the problem?
Thanks,
Ralf.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org