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 properties file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "properties file" Watch "properties file" New topic
Author

properties file

govind rajulu
Greenhorn

Joined: Jun 07, 2008
Posts: 3
hi all
i have one doubt which relates to properties file in struts
i.e how to access and modify properties file which is located out side the war.

please let me know the answere

thanks
[ June 10, 2008: Message edited by: Bear Bibeault ]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
As long as you know the path to a file, you can always use the classes in the java.io package to read from and write to the file. This includes a .properties file.


Merrill
Consultant, Sima Solutions
govind rajulu
Greenhorn

Joined: Jun 07, 2008
Posts: 3
Originally posted by Merrill Higginson:
As long as you know the path to a file, you can always use the classes in the java.io package to read from and write to the file. This includes a .properties file.


thanks for your reply

i do not know how to access properties file form outside the war
please give me one example so that i can understand clearly

thanks
govind
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Here' a link on how to read from and write to a properties file.

http://exampledepot.com/egs/java.util/Props.html

Doing this in a web application is no different than doing it any other Java application. All you need is the full path to the file.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: properties file