I'm trying to add log4j 2.x to a Servlet 2.5 web app. One goal is to also be able to deploy the artifact on a Servlet 3.x container as the servers are migrated [from JBoss 5.x to 7].
When testing on JBoss 7.1, an exception is thrown from Log4jServletContainerInitializer [line 49] as the servlet context gets the major version [3.x] from the container instead of the 'effective' major version [from the artifact's web.xml file]. The comment in the [2,0 RC1] onStartup method says "… For consistency across all containers, if the effective Servlet major version of the application is less than 3.0, this initializer does nothing." So, should the code be invoking servletContainer.getEffectiveMajorVersion() ??
