if you're using Tomcat, place your log4jconfig.xml file in WEB-INF/classes directory and log4j.jar in the lib directory. Taht will initialize Log4J.
If you want to use a special Servlet, this might help.
you web.xml should have
if you have an xml config file, use DOMConfigurator instead of PropertyConfigurator.
Hope this helps, Regards,
Joined: Jun 23, 2004
Hi Paval!! I haven't answered before because I just came from holidays. Thanks for your help! The problem I have is that prefix = getServletContext().getRealPath("/"); returns null. If I set the prefix this way : prefix= "F:\ibt\logs\" it works perfectly What am I doing wrong? Regards Miguel