tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dirk Weigenand" <Dirk.Weigen...@gmx.de>
Subject Re: Problem for loading files under WEB-INF/classes
Date Fri, 10 Jun 2005 08:48:43 GMT
Hi,

> 
> I want to load some files that I've placed in the WEB-INF/classes 
> directory of my project (particularly the file log4j.properties).
> 
> The problem is that I always have the same errors logged in stdout 
> tomcat's log file : java.io.FileNotFoundException...
> 

you can load your properties via 

InputStream is = getClass().getResourceAsStream( "/log4j.properties" );

> The files are well-placed, and curiously my webapp can read a ressource 
> bundle file that I provide for i18n, which is in this same directory.
> 
> I believed that Tomcat automatically place files under WEB-INF/classes 
> into the path of the webapp. I'm wrong ? What's the problem exactly ?
> 
> Thank you for your help.
> 
> Note: Running Tomcat 5.5.9 under Windows XP or Windows 2000, JVM 1.5
> 

Works for me with Tomcat 5.5.7/Windows XP and Tomcat 5.5.9/Debian Sarge.

regards,

     Dirk

-- 
Weitersagen: GMX DSL-Flatrates mit Tempo-Garantie!
Ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message