I have an application that has used <bean:message> for quite some time. I have had multiple struts-config files and each one defined message-resources that it needed. This all worked correctly I just changed my application to use Struts Modules. I confirmed that I have everything working correctly with tiles and my navigation, but when I use a bean:message tag that references a message-resource definition in one of the module config-files, I get an error stating that Cannot find message resources under key managementMessages Where managementMessages is the name of the key in the <message-resources> declaration The page being rendered is in the same Struts Module that the <message-resource> being requested is defined Also, If the <bean:message> tag references a <message-resources> in the default module, then it works correctly Anyone come across this before? I am ready to ditch modules if I cannot get this working. Thanks
hi USe this <message-resources null="false" parameter="name of properties file"/> <message-resources key="another name" null="false" parameter="another name"/> here key name is same as parametere name for eg <message-resources null="false" parameter="xyz"/> <message-resources key="abc" null="false" parameter="abc"/> xyz.propertis abc.properties xyz is the default property file and inside jsp u use the for second properties file <bean:message bundle="abc" key="lable.keyname"/> for first one ther is no need to specify the bundle = " " (properties file name hope u can understand this and will help u.
Joined: Sep 06, 2003
That didn't seem to do anything. The only thing that worked was for me to copy the <message-resources> definition from each module's struts-config file and put it into the struts-config file of the default module. This defeats the purpose of having modules. Anyone else have any suggestions?
Is the problem solved now? Because it seems that I have still the same problem: I have an application with several modules. In one of this module, I define the two following messages resources: <message-resources key="context" null="false" parameter="blabla.context.ApplicationResources"/> <message-resources key="menu" null="false" parameter="blabla.authorization.ApplicationResources"/>.
And in my JSP, I have: <bean:message bundle="context" key="myLocale"/> => When I want to display the page, I get the following error: "Cannot find message resources under key context"
However, if I add the module context path, it works: <bean:message bundle="context/path_to_my_module" key="myLocale"/>
And I don't like the idea to "hardcode" my module path in each <bean:message> bundle property...
Thanks in advance,
[ September 28, 2005: Message edited by: Jeremy Tukif ] [ September 28, 2005: Message edited by: Jeremy Tukif ]