> Hello,
> I'm trying to access a properties file that's located in a package within
a
> jar file in /WEB-INF/lib.
> net/props/myProps.properties
> Can someone offer a suggestion?

This works for a properties file sitting in the 'classes' directory, but it
ought to work for a jar file in 'lib' since that would also be in your
CLASSPATH.

   ClassLoader cl = YourClassNameHere.class.getClassLoader();
   Properties props = new Properties();
   props.load( cl.getResourceAsStream( "filename.properties" ) ) ;

>From there you can play with the path, I don't know if it needs a leading
slash or not.

HTH,

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management


Reply via email to