At 12:29 PM +0800 11/17/04, Eric Chow wrote:
Hello,

I implement a EJBMessageResource that extends Struts' MessageResources.
How can I reload the MessageResources after the application starts ???

Struts stores its MessageResources object in the ServletContext under whatever key is specified using the "key" attribute in the struts-config.xml, or if none is specified, under org.apache.struts.Globals.MESSAGES_KEY. If you are using modules, the ServletContext attribute name is extended by adding the module config's "prefix" at the end.


So you can write any kind of web-based interface which retrieves your extension of MessageResources, and then call a method on your class that tells it to "reload itself". Alternatively, of course, you could look at the initModuleMessageResources method in ActionServlet to see how they get initialized in the first place. This would show you how to handle the whole set of resources for a module, in case you want to have a "reload" which is more "complete," rather than needing to know where to find just one MessageResources object.

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]



Reply via email to