Thanks for the help ...

btw, the syntax - cl.getResourceAsStream("/Test.properties") - works with
Tomcat 4 and above only, with Tomcat 3, it still returns null.

----- Original Message -----
From: "QM" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, June 28, 2004 5:31 PM
Subject: Re: problem with classpath


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]


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

Reply via email to