posted 16 years ago
I have a simple static class for creating a db connection, and need to be able to call a properties file with the db details in it from this class.
At the moment it uses a very basic:-
Properties props = new Properties();
props.load( new FileInputStream(new File("C:\\Java\\Tomcat \\webapps\\dbinit.properties")));
method, which is fine for a static location of the file, but a bit ugly.
I want to move the properties file into the WebApp (under /class folder I think) so need to know how to call the file from there?