I'm trying to load a properties file at startup in a servlet by doing a
ClassLoader loader = Thread.currentThread().getContextClassLoader();
InputStream is = null;
is = getServletContext().getResourceAsStream( propFileName );
while(loader != null && is == null) {
is = loader.getResourceAsStream( propFileName );
loader = loader.getParent();
}
This is returning null under tomcat 3.2 but worked fine under 3.1. The
file
exists in my classes directory under WEB-INF.
I've tried this with a leading / on the file name and without a leading
/ with the
same results. The web app is defined in my server.xml and resides
outside of
$TOMCAT_HOME/webapps.
Is anyone else having the same problem?
(Sun JDK 1.2.2_05, solaris 2.6)