Is there any way to statically access fields from resources defined in Struts?
Well, I have a solution.
String bundle = "common" ; String key = "date" ; MessageResources.getMessageResources(bundle).getMessage(Locale.EN, key);
This is very straightforward.
So why does Struts prefer to store and access the resources through the ServletContext? Is this faster?
Because at least in theory, you have no guarantee that the Message Resources are coming from a properties file. Some people want to be able to get them from a database, or from an XML file. These features aren't used all that often, but the design is to support them.
Joe
--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]