title: Setting external webapp logging configuration with Jetty and log4j
body: <p>I have a webapp packaged as a war which I deploy in Jetty (version 6.1.25). The web app makes use of log4j. I would like to be able to configure the webapp logging via a config file which is external to the war (i.e. not burnt in).</p>
  
  <p>I've tried using a custom context WebAppContext with an extra class path property pointing to the log4j.properties file that I want to inject to the webapp classpath, but this did not work.</p>
  
  <pre><code>&lt;Configure class="org.mortbay.jetty.webapp.WebAppContext"&gt;
    &lt;Set name="contextPath"&gt;/quantel&lt;/Set&gt;
    &lt;Set name="war"&gt;&lt;SystemProperty name="jetty.home" default="."/&gt;/webapps/quantel&lt;/Set&gt;
    &lt;Set name="extraClasspath"&gt;quantel/log4j.properties&lt;/Set&gt;
  &lt;/Configure&gt;
  </code></pre>
  
  <p>I get the following error message:</p>
  
  <pre><code>log4j:WARN No appenders could be found for logger (org.apache.commons.configuration.ConfigurationUtils).
  log4j:WARN Please initialize the log4j system properly.
  </code></pre>
  
  <p>Is it possible to do this with Jetty?</p>
  
  <p>Thanks in advance.</p>