> -----Original Message----- > From: Declan O'Shanahan (CAPE) > [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 05, 2002 4:31 AM > To: [EMAIL PROTECTED] > Subject: Multiple ApplicationResource Properties file with Struts > > > Hi there, > > I have searched the list for information on multiple message resources > properties files with Struts1-1b2. I have looked at the dtd for the > struts-config.xml > (http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd) > and it says > that there can be multiple message-resources elements. Yet > when I include a > second message-resources element in the struts-config.xml the > application > does not recognoise the new values. > > Does struts1.1b2 support multiple message resources > properties files? Any > hints or help on this would be appreciated.
Yes. I'm using multiple resource properties files with 1.1b2. You must specify a "key" attribute in all but your default message-resources elements. In order to pull messages from non-default properties files, you have to specify this key attribute of the message-resources element as the "bundle" attribute of the <bean:message> tags you are using in your JSP pages. If you have this in your struts-config file: <message-resources parameter="MyResources" key="MY_RESOURCES_KEY"/> You would insert messages from the specified properties file like this: <bean:message bundle="MY_RESOURCES_KEY" key="prompt.contact.name"/> At least, this is how I am doing it and it is working for me. Struts does the lookup in your default properties file when no "bundle" attribute is specified in your <bean:message> tag. > > Regards, > > Declan O'Shanahan > Cheers, Mike Van Riper -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>