Try removing the beginning "/". ie getClass().getResourceAsStream("app.properties");

Christopher Lambrou,
CGL Computer Services, Inc.
Empire State Building, 
PMB 16J Suite 3304 
New York, NY 10118
Tel: (212) 971-9723
Fax: (212) 564-1135
URL: http://www.cglcomputer.com
Email: [EMAIL PROTECTED]

On 6/22/2001 14:37:38, you said:
>Hi- I've deployed an application with Tomcat at the root (i.e. "/").  At one
>point I load a resource file with the command:
>
>InputStream is = getClass().getResourceAsStream("/app.properties");
>
>But Tomcat throws an exception here if the file app.properties is in the
>/WEB-INF/classes directory.  If I copy it into a directory that is in the
>default CLASSPATH, then it works fine.  Isn't the WEB-INF/classes directory
>for each deployed application automatically added to the Tomcat classpath?
>Is the behavior I'm seeing the expected behavior?
>
>I hope I'm just doing something thick... otherwise, its more problematic to
>be able to bundle up an application, because the resource files would need
>to be copied somewhere else.  Any advice?
>
>BTW Tomcat 3.2.2 on Win2k, no web server (i.e. Tomcat default, port 8080).
>
>Thanks!
>
>-Richard
>
>

Reply via email to