once trim the string and try to read it( but i am sure that u have placed that file in classes folder rather than where ur source code is .....) and if that still doesnt work better get the absolute path using a class file in the same directory
The storageDirectory.properties file is in the C:\jakarta-tomcat-5.0.27\webapps\AppName\WEB-INF\src\java\resources directory.
The classpath is C:\jakarta-tomcat-5.0.27\webapps\AppName\WEB-INF\src\java
Joined: Nov 19, 2000
The code works if I put the properties file in the WEB-INF\classes directory:
If I would rather put all my properties file in a folder; say, WEB-INF\classes\resources directory, is there any way to do it?
Joined: Sep 21, 2003
yah u can do that place the class file which loads the proprties file in the same directory r user relative ....see it should not be placed in src directory bcoz the code will be executed from the classes directory so obviously it will look in to classed untill unless u have hardcoded the path of the properties files to src
subject: Problem in Locating a properties File (Not the Struts application.properties)