要用文件流输入时,在tomcat下文件要放在哪个目录下。
koda 2001-11-28 12:33:33 在一个程序里要读入配置文件信息的内容,如下:
Properties prop = new Properties();
try {
prop.load(new FileInputStream("report.conf"));
}
catch(Exception e){
System.out.println("Error: Can't find property file!");
System.exit(1);
}
这时要把report.conf放在哪个目录下。把它放在%TOMCAT_HOME%/bin下是可以正常读入的。可是能改变一下它放的目录吗?怎么通过配置tomcat来改变?