struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <lau...@holoweb.net>
Subject Re: Using properties files other than ApplicationProperties
Date Tue, 11 Jul 2006 22:05:29 GMT
chamal desilva wrote:
> Hi,
> 
> I want store all messages in a properties file called
> MessageProperties.
> 
> I added this line to struts config file.
> <message-resources key="messages"
> parameter="arweb.resources.MessageResources"></message-resources>
> 
> How can I retireve values in properties file from my
> action classes in order to display them using
> </html:errors> tag.

Use getResources(request, key), where 'key' is "messages", to match your 
struts-config entry.

http://struts.apache.org/1.2.9/api/org/apache/struts/action/Action.html#getResources(javax.servlet.http.HttpServletRequest,%20java.lang.String)

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message