For anyone that's using 1.1, what's your approach for retrieving a message from a 
bundle other than the default bundle for an application. 

When Struts initializes itself, all of the MessageResources declared in the 
configuration file are initialized and stored in the ServletContext based on the "key" 
attribute from the <message-resources> element and the app prefix. 

The Action class provides the getResources(HttpServletRequest request) method, which 
returns the default MessageResources. But what about getting one of the non-default 
MessageResources? The RequestUtils has the message() method, but it depends on a 
PageContext object.

Is the best way to create a convience method in some utility or base Action class that 
accesses the ServletContext using the bundle "key". This seems like the only way, 
given what I'm seeing in the beta code. If anyone has any different ideas, I would be 
interested in hearing them.

Chuck
--
Sent via jApache.org

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to