I am assuming loader is an instance of a classloader. The classloader
doesn't see the conf directory. (But as your noticed - it does see the
common directory)
Your "easiest" (but tomcat specific) solution is to do something like this:
File confDir = new File(System.properties("catalina.home"), "conf");
File propFile = new File(confDir , "genPricing.properties");
Properties p = new Properties();
p.load(new FileInputStream(propFile));
-Tim
kaverappa.prabha...@do.treas.gov wrote:
We have to place, as per rules set by the department, the properties file in
the Conf directory of Tomcat AS. The TOMCAT does not find the properties file
placed in CONF directory but it does find when placed in Common or Shared
directory of TOMCAT.
I tried placing the directory path in the java code of Jdeveloper (see below
for variation of codes used) and created WAR file using Jdeveloper to deploy it
on TOMCAT. But still it does not find it.
I tried placing the directory path in the java code of Jdeveloper (see below
for variation of codes used) and created WAR file using Jdeveloper to deploy it
on TOMCAT. But still it does not find it.
prop.load(loader.getResourceAsStream("genPricing.properties"));
prop.load(loader.getResourceAsStream("/genPricing.properties"));
prop.load(loader.getResourceAsStream("/conf/genPricing.properties"));
prop.load(loader.getResourceAsStream("conf/genPricing.properties"));
prop.load(loader.getResourceAsStream("$tomcat_home\\conf\\genPricing.properties"));
prop.load(loader.getResourceAsStream("${tomcat_home}/conf/genPricing.properties"));
Any suggestion as to how to read the properties file located in CONF directory.
Quick response would be greatly appreciated.
Prabhakar
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org