Hi,
thanks to everyone who replied.
It
turns out that the using the context is the way to go. Using the
Classloader, one can
only
go from where the class was loaded, downwards.
-carlos rodriguez
___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST".-----Original Message-----
From: Mathew Jose Binoi P R [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 19, 2003 10:40 PM
To: [EMAIL PROTECTED]
Subject: Re: trying to run getResourceAsStream(0 from inside a WAR
Hi,
Use ServletContext to get the properties file from WEB_INF/properties folder.
eg:- String logFile = "/WEB-INF/properties/log4j.properties";
InputStream in = getServletContext().getResourceAsStream(logFile);
Best Regards,
Mathew
Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html