Re: OT: RE: Problem in Locating a properties File (Not application.properties)

2004-10-19 Thread Jeff Beal
From the documentation for java.lang.ClassLoader: " The name of a resource is a "/"-separated path name that identifies the resource." That is, try /resources/storageDirectory.properties. Caroline Jen wrote: Okay, this code works if I put the properties file in the WEB-INF\classes directory: fina

Re: OT: RE: Problem in Locating a properties File (Not application.properties)

2004-10-19 Thread Caroline Jen
Okay, this code works if I put the properties file in the WEB-INF\classes directory: final String PROPFILE = "storageDirectory.properties"; Properties oProp = null; oProp = new Properties(); oProp.load( getClass().getClassLoader().getResourceAsStream( PROPFILE ) ); I really would like to

Re: OT: RE: Problem in Locating a properties File (Not application.properties)

2004-10-19 Thread Caroline Jen
I tried: final String PROPFILE = "storageDirectory.properties"; Properties oProp = null; oProp = new Properties(); oProp.load( getClass().getClassLoader().getResourceAsStream( PROPFILE ) ); Now, I got: java.lang.NullPointerException java.io.Reader.(Reader.java:61) java.io.InputSt