gpt4 book ai didi

java - TldLocations 缓存 : null - Importing taglib on tomcat6

转载 作者:行者123 更新时间:2023-11-28 22:22:50 25 4
gpt4 key购买 nike

我收到臭名昭著的 TldLocationsCache: null。 :-(

我的 taglib 在我的 jar 的 META-INF 里面。所以在我的 web.xml 中我这样做:

<jsp-config> 
<taglib>
<taglib-uri>myTags</taglib-uri>
<taglib-location>/WEB-INF/lib/myTagLib-2.0.0.jar</taglib-location>
</taglib>
</jsp-config>

在我的 JSP 上:

<%@ taglib uri="myTags" prefix="m" %>

但后来我得到:

org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: null
org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:248)
org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCache.java:219)
org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:553)

我正在运行 Tomcat6。任何帮助将不胜感激。谢谢!

最佳答案

<taglib-location>应引用.tld , 所以改变

<taglib-location>/WEB-INF/lib/myTagLib-2.0.0.jar</taglib-location>

<taglib-location>/WEB-INF/lib/myTagLib-2.0.0.tld</taglib-location>

或与 tld 的路径类似的东西文件。

这也很有用:Removing <taglib> from web.xml

关于java - TldLocations 缓存 : null - Importing taglib on tomcat6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7827398/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com