On Mon, Jun 28, 2004 at 01:44:47PM +0530, Ankit Doshi wrote:
: I tried this, but the getResourceAsStream method always returns null.
: InputStream istream =
: cl.getResourceAsStream("/usr/local/tomcat/webapps/test/WEB-INF/classes/Test.
: properties");
: istream = cl.getResourceAsStream("Test.properties");

If the file is in the classpath, you must call

        cl.getResourceAsStream( "/Test.properties" )

Review the JavaDoc for getResourceAsStream() -- there are differences
between calling it with and without the preceding "/" on a filename.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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

Reply via email to