File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

Extending MessageResources in Struts

Krishna Attravanam
Greenhorn

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?

~K
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

What are the certain conditions?


A good workman is known by his tools.
Krishna Attravanam
Greenhorn

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)

~K
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 .


BUT

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



SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Extending MessageResources in Struts