Have the file AppResources.properties in your web app. class path (could be
right under classes dir)
Declare message resource in struts-config.xml:
<message-resources parameter="AppResources"/>
Alternatively, if you choose to put it under
/WEB-INF/classes/com/my/package/AppResources.properties,
you can declare:
<message-resources parameter="com.my.package.AppResources"/>
The point is to declare AppResources as a class (with a .properties
extension) and make sure it's visible to the class loader.
-----Original Message-----
From: Richard Raquepo [mailto:[EMAIL PROTECTED]
Sent: Monday, 2 June 2003 8:15 PM
To: Struts Users Mailing List
Subject: using message resources
can someone show me how to use message-resources? i can't seem to get it
right by following the documention.
the filename of my application resources is ApplicationResources.properties
i use to put my message resources in web.xml under my servlet using this:
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
...
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
....
</servlet>
>>> the above work .
now how do i put the message-resources tag... i put it on my
struts-config.xml but i cannot make my application
run... i always get this error:
[ServletException in:/layouts/crmDefaultLayout.jsp] Cannot find message
resources under key org.apache.struts.action.MESSAGE'
my message-resources config looks like this:
<message-resources>
<param-name>parameter</param-name>
<param-value>/WEB-INF/classes/ApplicationResources.properties</param-value>
</message-resources>
hope anyone could teach me and show me how to use message-resources...
thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]