struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manish Singla <Manish.Sin...@Sun.COM>
Subject Re: change dynamically ApplicationResources path
Date Sat, 27 Sep 2003 07:37:04 GMT
You may use following to set bundleName defined in struts-config.xml...
request.setAttribute(Globals.MESSAGES_KEY, bundleName);
but bundleName is MessageResources object ..... and bundleName is  key
attribute of message-resources in struts-config.xml...

OR
If above do not meet your requirements...
than you have write factory of message-resources and overload loadLocale
method of  PropertyMessageResources...


Caroline Lauferon wrote:

> Hello,
>
> I would like to know if it is possible to set the path of the
> ApplicationResources.properties file without hard-coding it in
> struts-config.xml.
> Indeed, I would like to read a property file (whose path is in an
> environment property) which would contain the path of the
> ApplicationResources to use.
> This would allow me to deploy my EAR, and then, without having to
> re-generate it and re-deploy it, change the ApplicationResources file.
>
> Thanks,
>
> Caroline


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


Mime
View raw message