【问题标题】:Can not find the tag library descriptor for "http://tiles.apache.org/tags-tiles"找不到“http://tiles.apache.org/tags-tiles”的标签库描述符
【发布时间】:2012-09-02 17:16:05
【问题描述】:
我正在使用 Tiles、Spring 和 Hibernate 创建一个应用程序。
运行时出现如下错误:
Can not find the tag library descriptor for "http://tiles.apache.org/tags-tiles"
所有的罐子都包括在内,映射也很好。我哪里出错了?
【问题讨论】:
标签:
spring
apache
hibernate
web-applications
tiles
【解决方案1】:
网址看起来不错。
您的问题听起来有点像您缺少一些瓷砖罐。确保将包含 tiles-jsp.tld 的 jar 添加到您的项目 web libs 文件夹中。
一个包含此文件的 jar 例如:tiles-jsp-2.2.1.jar。
【解决方案2】:
在 pom.xml 文件中附加在工件下面并且这次编译得很好。
<!-- Tiles -->
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-api</artifactId>
<version>2.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-core</artifactId>
<version>2.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-jsp</artifactId>
<version>2.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-servlet</artifactId>
<version>2.1.2</version>
</dependency>
【解决方案3】:
我从其他地方复制了带有taglib 声明的整个文件,并得到了相同的编译错误。我删除了文件,创建了一个新文件并粘贴了相同的内容。听起来很奇怪,但有效!希望它可以帮助某人。 :)
【解决方案4】:
即使在使用了 tiles-jsp.2.0.6.jar 之后,我也遇到了这个问题。所以我通过从 maven 依赖项中手动删除 jar 并将其添加为外部 jar 找到了解决方案。它有效,您也可以尝试这样做..
【解决方案5】:
在Spring项目的pom.xml中添加tiles依赖会有帮助-
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-jsp</artifactId>
<version>3.0.7</version>
</dependency>