This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

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 (there r a bunch of links in each enviroments)

say suppse the environment is 2

my link would say (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 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:
subject: Extending MessageResources in Struts
It's not a secret anymore!