File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "where to place properties file in sturts?" Watch "where to place properties file in sturts?" New topic
Author

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.
Thanks


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


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