You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mark Benussi <ma...@hotmail.com> on 2005/02/16 10:49:51 UTC
Retrieving properties from additional struts config file
I have defined the property in a second ApplicationResources.properties
file.
createTemplateKeywordsStage1Form.name.required = The name for the template
keywords is required
This file sits under a folder cm_module within the WEB-INF classes folder.
This is referenced in my cm-struts-config.xml file as:
<message-resources key="cm_module"
parameter="cm_module.ApplicationResources" null="false" />
In my web.xml I have defined my struts config files using
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml,/WEB-INF/ibt-content-struts-config.xml</param-value>
</init-param>
etc....
This is all working great but when I attempt to refer to a property in my
cm_module.ApplicationResources file I get:
???en_GB.createTemplateKeywordsStage1Form.name.required???
FYI I add the error message to my request in the validate method using:
errors.add("name", new
ActionError("createTemplateKeywordsStage1Form.name.required"));
Any ideas greatly apprciated.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org