The following simple tag file cannot be compiled with the jspc ant task (or the jpsc maven plugin) : <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %> Hello world ! <c:if test="${false}" > <tags:recursive /> </c:if> The error is org.apache.jasper.JasperException: /WEB-INF/tags/recursive.tag(21,0) Unable to load tag handler class "org.apache.taglibs.standard.tag.rt.core.IfTag" for tag "c:if" It's OK when the compilation is done "online", when the first jsp that uses this tag is called with a http request. The problem is that japer's TagFileProcessor does not set the correct classloader when compiling recursive tags. It works in online mode because the parent classloader of the jsp classloader is the webapp classloader.
Created attachment 26148 [details] patch for trunk (tc7) The issue occurs both in tomcat 6 and 7
Created attachment 26149 [details] patch for tomcat 6
Thanks for the patches. Patch applied to trunk and will be included in 7.0.4 onwards. Patch proposed for 6.0.x.
Fixed in 6.0.x and will be in 6.0.30 onwards.