【问题标题】:Unknown tag (s:select)未知标签 (s:select)
【发布时间】:2018-05-12 23:49:19
【问题描述】:

我为 structs-taglibs 添加了依赖项。

<!-- https://mvnrepository.com/artifact/org.apache.struts/struts-taglib -->
    <dependency>
        <groupId>org.apache.struts</groupId>
        <artifactId>struts-taglib</artifactId>
        <version>1.3.10</version>
    </dependency>

现在我在 Maven 依赖项中看到 struts-taglib-1.3.10-sources.jar。

在Jsp中我添加了

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

然后

<s:select key="id" list="@com.compsys.model.RightsGroupService@name"/>

但所有这些标签都带有黄色下划线和未知标签(s:select)。

你能帮帮我吗?

【问题讨论】:

  • 如果你不介意我问,Struts 1.x 已经死了。它已通过其 EOL(寿命终止)。你为什么今天还在用它?
  • 您的选择标签看起来像您想使用 S2 而不是 S1。它们是不同的框架。

标签: java maven jsp struts taglib


【解决方案1】:

这是因为在 Struts 1.x 中,select 标记不在 struts-taglib 库中,而是在 struts-html 库中。

这里是一个example,关于如何使用 Struts Select 标签。

我希望这会有所帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-03-16
    • 2012-01-14
    • 1970-01-01
    • 1970-01-01
    • 2018-01-02
    • 2021-08-17
    • 2021-05-11
    相关资源
    最近更新 更多