The problem is that java.util.Properties is loaded by the system
class loader, which knows nothing about the class loaders for the
web-applications.  You need to do something like:

public MyClass {

        public loadProps() {
                MyClass.class.getResourceAsStream("my.props");
        }
}
Then, as long as MyClass and my.props are loaded by the same class loader,
the properties file will be found and loaded.

        Randy


-----Original Message-----
From: Christoph Rooms [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 23, 2001 2:24 PM
To: [EMAIL PROTECTED]
Subject: properties files and tomcat


Hi,

I want to read a properties file like this : 

Properties.class.getResourceAsStream("my.properties");

This function should find the properties files when it's in the CLASSPATH.

I have putted the properties file in the WEB-APPS dir ... 

anyone ?

thanks ...Christoph

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to