dcsimg
Re: Reading from Properties Files using relative path
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   suc_Jag
Posted On:   Thursday, April 6, 2006 01:54 AM

Hi,

Here some how I am able to get the properties files in to my java program. Now I am facing another problem.

properties file has the following properties:

access_dir=/mydir


In my java program I am able to get the value of access_dir from the above properties file but the next coding which has to access that directory is not able to locate the directory (/mydir) which is at the root of the web application. I am getting file not found exception..

How to solve these path problems??

Thanks

Re[2]: Reading from Properties Files using relative path

Posted By:   WarnerJan_Veldhuis  
Posted On:   Thursday, April 6, 2006 04:34 AM

To get the real path, play around with ServletContext.getRealPath(String)
About | Sitemap | Contact