This week's book giveaway is in the Programmer Certification forum. We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
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,
posted 15 years ago
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