File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Extending MessageResources in Struts

 
Krishna Attravanam
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4727
Mac Ruby VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the certain conditions?
 
Krishna Attravanam
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1312
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic