This is my log4j.xml and I want to create a log file wws.log either in a folder where folder path = AE_HOME/logs/ where AE_HOME = "C:/AE/" and AE_HOME is set as a system variable by another program already.

Java Code:
   <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
    <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
        debug="false">
        <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
            <!--<param name="File" value="${AE_HOME}/logs/wws.log"/>  -->
            <param name="File" value="wws.log"/>
            <param name="Append"            value="true" />
            <param name="ImmediateFlush"    value="true" />
            <param name="MaxFileSize"       value="20MB" />
            <param name="MaxBackupIndex"    value="10" />
            <layout class="org.apache.log4j.PatternLayout">
                <param name="ConversionPattern" value="%-4r [%t] %-5p %c %x - %m%n" />
            </layout>
        </appender>
I also tried using env:AE_HOME in the file path but still I dont find the log file getting generated anywhere. I tried hard coding the path too, but still no log file. I have permission to write in the C drive so that's not an issue.

This is where the logger is being setup in the ServletInit class:

Java Code:
    //initialize log4j
    String log4jConfig = event.getServletContext().getInitParameter("log4j-config"); // log4jConfig = "WEB-INF\log4j.xml"
    if (log4jConfig == null){
        System.err.println("No log4j-config init param, initializing log4j with BasicConfigurator");
        BasicConfigurator.configure();
    }else {
        String webAppPath = event.getServletContext().getRealPath("/");
        String log4jProp = webAppPath + log4jConfig;
        File log4jConfigFile = new File(log4jProp);
        if (log4jConfigFile.exists()) {
            System.out.println("Initializing log4j with: " + log4jProp);
            DOMConfigurator.configure(log4jProp);
        } else {
            System.err.println(log4jProp + " file not found, initializing log4j with BasicConfigurator");
            BasicConfigurator.configure();
        }
    }
    System.out.println("log4j configured properly");
    logger = Logger.getLogger(ServletInit.class.getName());
    logger.info("INITIALIZED APPLICATION");
Is there something I am doing wrong?

Please advise.