wood burning stoves 2.0*
The moose likes Struts and the fly likes where to place properties file in sturts? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "where to place properties file in sturts?" Watch "where to place properties file in sturts?" New topic

where to place properties file in sturts?

Jas Oberai
Ranch Hand

Joined: Jan 16, 2005
Posts: 231
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.

SCJP 1.4 (88%)<br />SCWCD 1.4 (88%)
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
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

Consultant, Sima Solutions
wood burning stoves
subject: where to place properties file in sturts?
Similar Threads
Including fonts in PDFs using iText
reding in csv file
placing a dll file
Using ANT utility for tomcat
Download a file created on runtime