File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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 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 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 file in WEB-INF/classes/com/mycompany

Consultant, Sima Solutions
I agree. Here's the link:
subject: where to place properties file in sturts?
Similar Threads
reding in csv file
Using ANT utility for tomcat
Including fonts in PDFs using iText
Download a file created on runtime
placing a dll file