We originally tried to align with Tomcat. I had assumed that things had got out of sync, but Tomcat skips log4j*.jar by default so I don't think it'll work there either by default either.

@markt-asf, should Tomcat's default be updated so that log4j-taglib isn't skipped?

Comment From: wilkinsona

Scratch that. I see now why it works when deployed to a Tomcat installation. Tomcat overrides the skipping to include log4j-taglib*.jar.

Comment From: wilkinsona

We seem to be missing configuration that overrides the skipping. Tomcat does so for 4 patterns:

log4j-taglib*.jar
log4j-web*.jar
log4javascript*.jar
slf4j-taglib*.jar

In the meantime, a workaround is to use a TomcatContextCustomizer to tune the context's jar scanner:

@Bean
TomcatContextCustomizer log4jTldScanningCustomizer() {
    return (context) -> 
        ((StandardJarScanFilter)context.getJarScanner().getJarScanFilter()).setTldScan("log4j-taglib*.jar");
}

Comment From: rahulkhimasia

Thanks Andy. The workaround does work as expected.