Tomcat 7 introduced a feature to skip the scanning of certain JARs to improve 
JSP engine initialization. This feature including a default setting to skip 
many popular JARs that were known not to contain TLDs or SCIs. Unfortunately, 
this included a log4j*.jar default exclusion, meaning the Log4j JARs are not 
scanned for TLDs.

See the Tomcat bug/feature request 
https://issues.apache.org/bugzilla/show_bug.cgi?id=54770

This is fixed in Tomcat 7.0.43 and Tomcat 8. Tomcat no longer skips the Log4j 
JARs when scanning for TLDs and SCIs. 7.0.43 has not been released yet. It is 
being held up by a project to port the Java EE 7/JSR-356 WebSocket 
implementation from Tomcat 8 to Tomcat 7. The expected release is sometime in 
the middle of September, hopefully earlier.

For now you can edit your catalina.properties file and take the log4j*.jar 
exclusion out of the jarsToSkip property.

I need to improve the documentation surrounding this. That's on my calendar.

Nick

On Aug 22, 2013, at 4:48 PM, Jason B wrote:

> All,
> 
> I'm running into a bit of weirdness when using Tomcat 7 and Log4j2's Tag
> Library.  I have a JSP set up with the following property:
> 
> <%@ taglib uri="http://logging.apache.org/log4j/tld/log"; prefix="log" %>
> 
> ...which works just fine with Tomcat 6, whenever I hit an error condition.
> 
> However, if I move to Tomcat 7, I get the following exception:
> 
> 
> org.apache.jasper.JasperException: The absolute uri:
> http://logging.apache.org/log4j/tld/log cannot be resolved in either
> web.xml or the jar files deployed with this application
> 
> If I move the .tld into my META-INF folder, it works fine as well.
> 
> Is this some sort of issue between Tomcat 6 and Tomcat 7 that hasn't been
> explored yet, or am I missing a configuration step?

Reply via email to