gpt4 book ai didi

java - 错误: No tag "iterator" defined in tag library imported with prefix "logic"

转载 作者:行者123 更新时间:2023-11-30 07:57:17 25 4
gpt4 key购买 nike

Error: javax.servlet.ServletException: org.apache.jasper.JasperException: /ArrayList.jsp(9,2) No tag "iterator" defined in tag library imported with prefix "logic"
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
javax.servlet.http.HttpServlet.service(HttpServlet.java:770)

这里我包含了我的 Web.xml 文件。

<web-app>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-Param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-Param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

<taglib>
<taglib-uri>
http://struts.apache.org/tags-bean
</taglib-uri>
<taglib-location>
/WEB-INF/struts-bean.tld
</taglib-location>
</taglib>
<taglib>
<taglib-uri>
http://struts.apache.org/tags-html
</taglib-uri>
<taglib-location>
/WEB-INF/struts-html.tld
</taglib-location>
</taglib>
<taglib>
<taglib-uri>
http://struts.apache.org/tags-logic
</taglib-uri>
<taglib-location>
/WEB-INF/struts-logic.tld
</taglib-location>
</taglib>
</web-app>

最佳答案

在 URL http://struts.apache.org/tags-logic 定义的 tld 中,没有标签iterator。有 iterate 标签名称。如果您使用自定义 tld,则应在 taglib 标记和 tld 文件中指定不同的 URI。

<taglib>
<taglib-uri>
/tags-logic
</taglib-uri>
<taglib-location>
/WEB-INF/struts-logic.tld
</taglib-location>
</taglib>

在JSP中使用导入

<%@ taglib uri="/tags-logic" prefix="logic" %>

关于java - 错误: No tag "iterator" defined in tag library imported with prefix "logic",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32500826/

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