Re: trying to run getResourceAsStream(0 from inside a WAR

Mathew Jose Binoi P R <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.