If they are under WEB-INF/classes then should be in your classpath, unless something is really wrong, so you can access them using

getClass().getResourceAsStream("/full/path/from web-inf_class") or getClass().getResourceAsStream("relativepath_from_class").

or use getClass().getResource().

if that isn't working, then I'm stumped.

Tim

Vincent wrote:
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...

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


---------------------------------------------------------------------
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