I have placed a property file in the webaaps folder of tomcat but not able to access it. My code is
InputStream is = ClassLoader.getSystemResourceAsStream("database.properties");
if(is == null){
is = ClassLoader.getSystemClassLoader().getResourceAsStream("database.properties");
}
if(is == null){
is = ClassLoader.getSystemClassLoader().getResourceAsStream("/database.properties");
}
if(is == null){
is = ClassLoader.getSystemClassLoader().getResourceAsStream("/webapps/database.properties");
}
if(is == null){
is = ClassLoader.getSystemClassLoader().getResourceAsStream("webapps/database.properties");
}
Still , I am getting input stream as null.