It's actually fairly simple to do. There's a detailed example in the WebWork in Action book (see page 375).
Struts 2 (and WW2) search the class heirarchy for message resources, looking first for classes that Essentially, you can implement the Java ResourceBundle interface and have it lookup the messages from whereever. You can then plug the class in using a Struts 2 property struts.custom.i18n = MyResourceBundle or by calling LocalizedTextUtil.addDefaultResourceBundle("MyResourceBundle") from a ServletContextListener at startup. The ResourceBundle class is then discovered and utilized just like a .properties file. -Ted. On 11/17/06, Nate Drake <[EMAIL PROTECTED]> wrote:
Hi, We're in the process of migrating a Struts1 app to Struts2. In Struts1 we created a subclass of PropertyMessageResources to get our messages from the database instead of properties files. I can't seem to find how we'd go about doing this in Struts2. Do I just subclass com.opensymphony.xwork.util.LocalizedTextUtil and configure the framework to use it? Thanks! Nate
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]