wood burning stoves 2.0*
The moose likes Struts and the fly likes Extending MessageResources in Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Extending MessageResources in Struts" Watch "Extending MessageResources in Struts" New topic

Extending MessageResources in Struts

Krishna Attravanam

Joined: Oct 21, 2004
Posts: 16
Hi I have a requirement which requires me to load different properties files based on a certain set of conditions.

Is there a way i can do it in Struts (something like extending MessageResources)???

Please let me know how?

Marc Peabody
pie sneak

Joined: Feb 05, 2003
Posts: 4727

What are the certain conditions?

A good workman is known by his tools.
Krishna Attravanam

Joined: Oct 21, 2004
Posts: 16
I am working on different environemnts and my page has different links based on each environments

say suppse the environment is 1

my link would say http://env1.myweb.com (there r a bunch of links in each enviroments)

say suppse the environment is 2

my link would say http://env-env2.myweb.com (there r a bunch of links in this enviroment too)

somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
i'm not sure about both environment , if both have difference locale, you can create messageresources.properties file and messageresources_<locale>.properties .


you want to get properties file in you code directly, you can do like this

Java Developer, Thailand
I agree. Here's the link: http://aspose.com/file-tools
subject: Extending MessageResources in Struts
Similar Threads
Getting MessageResources inside ActionForm
How to deal with errors
MessageResources VS ResourceBundle