Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

where to place properties file in sturts?

 
Jas Oberai
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
I am new to struts....and I am not understanding where to place my MessageResource.properties file.
I want to place it in one place such that all the files in different places in the application can read it...can i set it up in the classpath..please help.
Thanks
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You define the location of your ApplicationResources.properties file using the <message-resources> tag in the struts-config.xml file.

So, if you put this in your struts-config.xml file:

<message-resources parameter="com.mycompany.ApplicationResources" />

you should place your ApplicationResources.properties file in WEB-INF/classes/com/mycompany
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic