Originally posted by Cyc Lid:
1. i didn't say the file is in WEB-INF, it's in WEB-INF/classes, the folder where you put all your servlets classes, which IS the folder the container services for requests.
You don't get the point: WEB-INF is not a public node. /classes is in WEB-INF, so is not a public directory. It is used to put their contents available for the application class loader.
2. of course i'm using a connection pool, but it still needs some preferences to be initialized. i also use
getClass().getResourceAsStream(filename) as you said, which loads the properties file, but only if it's in WEB-INF/classes too...
any other ideas?
10X
If you read again Gregg's post you will notice he said:
servletContext().getResourceAsStream("/WEB-INF/pathtofile/file.properties");
nor getClass.getResourceAsStream(filename)
And if you really use connection pooling, you dont need any configuration file in the /classes directory, you can put the init values in the deployment descriptor.
HTH