tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "petra staub" <cal...@hotmail.com>
Subject Reading properties file from ClassPath (ServletContextListener)
Date Thu, 01 Aug 2002 14:05:25 GMT


Hi,

I currently dont understand the following:

I have a registered class as a ServletContextListener.
At application start I want to read a Properties file
from the classpath, doing the following:

myProps = new Properties();
try {
   URL url = ClassLoader.getSystemResource("com/foo/My.properties");
   InputStream istream = url.openStream();
   myProps.load(istream);
} catch (Exception exp) {

}

_________________________________________________________________
Mit MSN Fotos können Sie kinderleicht Ihre Fotos ausdrucken und Freunden zur 
Verfügung stellen: http://photos.msn.de


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message