public void init() throws ServletException {
    String prefix = getServletContext().getRealPath("/");
    String file = getInitParameter("log4j");if (file != null) {
      PropertyConfigurator.configure("E:/JBProject/work/weather/defaultroot/WEB-INF/log4j.properties");
    }
  }
:log4j不是象你这样的用法,具体要看看apache上的用法介绍,看看你的配法对不对。。