My mistake, the plumbing is in the DTD to do this (i.e. a className for a custom MessageResourcesConfig and the <set-property> element) but the digester rules always create the standard MessageResourcesConfig and ignore any custom implementations specified in the className.
However, even if that was fixed - the factory is only given access to the parameter and not the MessageResourcesConfig - so if you did set some custom properties, there isn't a straightforward way to access them. One way you could do this would be to specify the name of a properties file in the "parameter" - then in your factory read the properties from there. Sorry, I assumed that since the DTD provided for setting properties - the mechanism would be in there to make it work. Unfortunately its not :-( Niall ----- Original Message ----- From: <[EMAIL PROTECTED]> Sent: Friday, June 17, 2005 1:56 AM > Thanks Niall. If I were to use <set-property> elements, do you have any > idea how I would retrieve those properties within the factory? > > Thanks, > David > > "Niall Pemberton" <[EMAIL PROTECTED]> wrote on 06/16/2005 > 04:03:36 PM: > > > You need to configure your message resources through the > struts-config.xml - > > init parameters in the web.xml don't work in Struts 1.2 > > > > http://struts.apache.org/userGuide/configuration.html#resources_config > > > > So in your case you need something like the following in your > > struts-config.xml.... > > > > <message-resources parameter="..." > > factory="org.example.MyMessageResourceFactory " /> > > > > You can use the "parameter" element for any configuration value you want > - > > thats the argument passed to the factory's createResources() method. I > > believe you can also use <set-property> elements for other config values > - > > although I've never actually tried it out. > > > > Niall --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]