static void configure(Properties properties);
static void configure(String configFilename);
static void configure(URL configURL);
InputStream is = getServletContext().
getResourceAsStream("/WEB-INF/log4j.properties");
Properties props = new Properties();
try
...{
props.load(is);
}
catch (IOException e)
...{
System.err.println("Load log4j
configuration failed");
}
PropertyConfigurator.configure(props);
Returns a URL to the resource that is
mapped to a specified path. The path
must begin with a "/" and is interpreted
as relative to the current context root.
This method allows the servlet container
to make a resource available to servlets
from any source. Resources can be located
on a local or remote file system,
in a database, or in a .war file.