This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP 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