Tomcat - FileNotFoundException
I have a web application deployed on my tomcat server. My folder structure
is TOMCAT_HOME/webapps/segnalazioni_degrado/config.
The config folder contains some properties files. When I run my
application in Development Mode (Eclipse) everything works fine, but since
I deployed it on Tomcat I am getting the filenotfound exception. This is
the way I load the .properties file on the server:
[...]
Properties props = new Properties();
try {
props.load(new FileInputStream("config/DBconfig.properties"));
} catch (IOException e) {
System.out.println(e.getMessage());
}
url = props.getProperty("url");
user = props.getProperty("user");
password = props.getProperty("password");
[...]
Am I doing something wrong?
No comments:
Post a Comment