任何人都知道JSON taglib是否仍在工作?
我将它包含在我的jsp中,它给了我一个错误。这个错误说明了这一点:
org.apache.jasper.JasperException: The absolute uri: http://www.atg.com/taglibs/json cannot be resolved in either web.xml or the jar files deployed with this application.
我在我的WEB-INF / lib存储库中包含了json-taglib-0.4.1.jar文件,并且还将它包含在我的jsp页面顶部:
<%@taglib prefix="json" uri="http://www.atg.com/taglibs/json"%>
但错误出现了,我不知道为什么。任何人都知道如何为我的jsp页面添加JSON taglib?
答案 0 :(得分:0)
想要帮助,但是我的声誉水平仍然不允许我这样做:-), 因为写在答案
我认为我们必须发送列出您的web.xml
例如
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
<display-name>mon</display-name>
<jsp-config>
<!-- JSTL Tag Library Local Descriptors -->
<taglib>
<taglib-uri>/WEB-INF/jstl/c.tld</taglib-uri>
<taglib-location>/WEB-INF/jstl/c.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/jstl/fmt.tld</taglib-uri>
<taglib-location>/WEB-INF/jstl/fmt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/jstl/fn.tld</taglib-uri>
<taglib-location>/WEB-INF/jstl/fn.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/jstl/sql.tld</taglib-uri>
<taglib-location>/WEB-INF/jstl/sql.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/jstl/x.tld</taglib-uri>
<taglib-location>/WEB-INF/jstl/x.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/jstl/taglib34.tld</taglib-uri>
<taglib-location>/WEB-INF/jstl/taglib34.tld</taglib-location>
</taglib>
</jsp-config>
<welcome-file-list>
<welcome-file>main.jsp</welcome-file>
</welcome-file-list>
</web-app>
&#13;
并检查构建项目, 例如IDEA