the properties file path in java web application

来源:互联网 发布:想学c语言先学什么 编辑:程序博客网 时间:2024/05/03 00:22

Using following code

Properties p=new Properties();
InputStream in=getClass().getResourceAsStream("/test.properties");
p.load(in);

then put the file in the web-inf/classes

 

sometimes minor detail means many.

原创粉丝点击