Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Servlet Interest »

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

Mathew Jose Binoi P R

2003-11-19



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
©2008 junlu.com - Jax Systems, LLC, U.S.A.