i upgraded from 5.5.4 to 5.5.7 and noticed that my ant jsp precompile task was failing for .jsp files that were referencing taglibs. the message it gives is: org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml or the jar files deployed with this application the line in the offending jsp looks like: <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %> if i go into the jstl taglib jar file and grab the sql.tld file and put it into my WEB-INF then the jspc task works. in 5.5.4 this worked without having the sql.tld file in WEB-INF (it was just found in the .jar file of the tag library)
I am not aware of any relevant changes. Please provide a ready to test war.
there were changes to o.a.jasper.jspc.java concerning the classloader. i can't demonstrate this in a ready to run war since the problem doesn't happen if i let jsp's compile at runtime. this is only happening to me at precompile time. i did some more testing and have narrowed the behavior down to a case where if i have 2 .jsp files named a.jsp and b.jsp and the second one alphabetically (b.jsp) has the taglib reference but a.jsp doesn't, then the bug happens. if i rename a.jsp to c.jsp so that the non taglib jsp comes after the taglib one, then it works. it appears that something magic is happening so that precompiling with taglibs only works if the first jsp that is processed by jspc.java contains a taglib reference. if you diff jspc.java between 5.5.4 and 5.5.7 you'll see a number of changes regarding its management of the classloader that may or may not be the culprit. hope this is of some help :)
The jspc changes are not relevant. Without a test war -> invalid. BTW, jsp-examples is precompiled as part of the Tomcat build process. It contains JSTL pages, without expanded TLDs. Do you have any explanation as to why it precompiles without errors ?
excellent point :) i downloaded 5.5.7-src.zip and am able to compile it under cygwin on win xp. you are correct that the jsp-examples precompile correctly. once it had all compiled successfully, i dropped one new .jsp into the .../jakarta-tomcat-5.5.7-src/jakarta-servletapi-5/jsr152/examples/tagplugin directory. this jsp is named aaa_breaks_jspprecompile.jsp and contains has one line it: <h3>no taglib uri reference in first file alphabetically makes jspc die</h3> (note there is no reference to a taglib) i then did a touch *.jsp in that tagplugin directory to make all the .jsp's out of date and re-ran ant and sure enough i get: build-webapps-precompile: BUILD FAILED C:\workspace\toolbelt\tomcat\jakarta-tomcat-5.5.7-src\build.xml:50: The followin g error occurred while executing this line: C:\workspace\toolbelt\tomcat\jakarta-tomcat-5.5.7-src\jakarta-tomcat-5\build.xml :767: The following error occurred while executing this line: C:\workspace\toolbelt\tomcat\jakarta-tomcat-5.5.7-src\jakarta-tomcat-5\build.xml :372: org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/j sp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application i know this sounds crazy, but it appears that as long as the first .jsp file (sorted alphabetically) in any given directory of a webapp does NOT use taglibs, then no other jsp in that same directory that uses taglibs will precompile. hopefully it's easy for you to create the aaa_breaks_jspprecompile.jsp file in the above mentioned directory and replicate the problem in your own build environment. i apologize for not attaching a war file but demonstrating the problem only requires this single .jsp and a touch *.jsp so that all files in that subdir are marked as out of date. thanks!
That's a good example. This should be fixed now.
*** Bug 33358 has been marked as a duplicate of this bug. ***
*** Bug 34134 has been marked as a duplicate of this bug. ***