Jsp tld files cannot be resolved

I use JSP 1.2 with taglib declarations from either JSTL or spring on tomcat 7 local application server. But always, whether the files are under WEB-INF/lib or in some other place on the classpath, I always get errors like these: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application The absolute uri: http://www.springframework.org/tags/form cannot be resolved. etc.

The only way I could get tomcat to resolve those files was when I actually extracted them from the jar into the WEB-INF folder.


After I got lost hours with this problem - I asked some other member in my team, who told me that for performance purposes - there was a configuration in the catalina.properties file to skip the tld files scanning:

tomcat.util.scan.StandardJarScanFilter.jarsToSkip=*
org.apache.catalina.startup.ContextConfig.jarsToSkip=*
org.apache.catalina.startup.TldConfig.jarsToSkip=*
tomcat.util.scan.DefaultJarScanner.jarsToSkip=*

(See for explanations here: https://wiki.apache.org/tomcat/HowTo/FasterStartUp and here: https://tomcat.apache.org/tomcat-7.0-doc/config/systemprops.html )

So I changed it to skip only some heavy jars (although I could've added any jar which I know that don't contain tld files) and the problem was solved.

链接地址: http://www.djcxy.com/p/12970.html

上一篇: 正则表达式原子分组不够贪婪

下一篇: Jsp tld文件无法解析