【问题标题】:Cannot find the tag library descriptor for /WEB-INF/struts-html.tld in Struts在 Struts 中找不到 /WEB-INF/struts-html.tld 的标记库描述符
【发布时间】:2016-03-22 15:15:36
【问题描述】:

我是 Struts 框架的新手,在开发简单的 Struts 2 应用程序时遇到以下错误:

Cannot find the tag library descriptor for /WEB-INF/struts-html.tld

如何解决这个错误?

【问题讨论】:

    标签: jsp struts2 struts struts-tags


    【解决方案1】:

    struts-html.tld 是 Struts 1 标签的 TLD。

    Struts 2 使用单个 TLD,struts-tags.tld,它位于 struts2-core-2.x.x.jar 中。

    你可以这样声明:

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

    还有其他 TLD,如 struts-dojo-tags(在 2.1 中已弃用)、struts-jquery-tags 等...但从主要的 TLD 开始,浏览 Struts2,然后最终尝试使用“扩展”。

    【讨论】:

    • (Dojo 标签在 2.1 中被弃用,但在 2.0 中存在。现在仍然存在 :(
    • 像往常一样,谢谢@Dave :D (题外话:我在 Struts3 线程中读到了一些关于 nabble 的帖子...什么时候发布?)
    • 我还不知道——我想我们仍在弄清楚我们希望它是什么样子。我有几件事想补充,但像往常一样,时间/可用性是一个问题:)
    【解决方案2】:

    找不到标签库描述符

    对于上述错误。

    请将 Struts 2 核心 jar 文件上传到您的应用程序/Web 项目的构建路径,它可以工作。

    谢谢 古斯可汗。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-05-02
      • 2011-11-19
      • 2017-03-01
      • 2011-04-27
      • 1970-01-01
      • 2011-09-13
      • 1970-01-01
      • 2012-07-05
      相关资源
      最近更新 更多