Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

properties file

 
govind rajulu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
govind rajulu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic