I have a servlet deployed as a war in JBoss 4.0.2. I have a properties file for the deployed application. Where should I put this file? Under the conf directory in the jbo
Just get hold of the servletContext and then
InputStream stream = getServletContext().getResourceAsStream("/WEB-INF/log4j.properties"); Properties props = new Properties(); props.load(stream);
This will always work, regardless of whether you deploy a war or exploded war.