Spring application without web.xml log4j configuration
问题 I have a Spring + Jersey web application that I'm migrating from a web.xml to annotation base configuration. I'm implementing WebApplicationInitializer and everything works except log4j, because I have a custom file name. In the web.xml I had <context-param> <param-name>log4jConfiguration</param-name> <param-value>/WEB-INF/custom-name-log4j.xml</param-value> </context-param> This worked. Now, I tried to do the same in Java: container.setInitParameter("log4jConfiguration", "/WEB-INF/custom