【发布时间】:2016-01-20 14:47:28
【问题描述】:
我有一个使用 Maven 和 Struts 1.3.10 的项目。
我的 Pom.xml 中的依赖项:
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts-core</artifactId>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts-taglib</artifactId>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts-extras</artifactId>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts-tiles</artifactId>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
...
</dependencies>
我的 JSP 中有错误,
JSP 示例:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@taglib uri="http://struts.apache.org/tags-html-el" prefix="html" %>
<%@taglib uri="http://struts.apache.org/tags-logic-el" prefix="logic" %>
<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@taglib uri="http://struts.apache.org/tags-bean-el" prefix="beanEl" %>
<%@taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@taglib uri="http://fckeditor.net/tags-fckeditor" prefix="fck" %>
<%@taglib tagdir="/WEB-INF/tags/" prefix="customTag" %>
<!-- Importation du CSS pour le widget Dialog -->
<link rel="stylesheet" type="text/css" href="<html:rewrite page="/css/yui/container.css" />"></link>
<!-- Importation du CSS pour le widget Calendar -->
<link rel="stylesheet" type="text/css" href="<html:rewrite page="/css/yui/calendar.css" />"></link>
问题是与我的 taglib 相比,我有很多错误
找不到标签库描述符 "http://struts.apache.org/tags-html-el"
找不到标签库描述符 "http://struts.apache.org/tags-logic-el"
等等等等……
为什么会出错
【问题讨论】:
-
你不觉得你在嵌套双引号吗?
-
您的 POM 中似乎没有 EL 标签库。
-
@SMA 没关系; JSP 将在客户端看到 HTML
<link>标签之前处理 JSP<html:rewrite>标签。 -
@DaveNewton 中没有
struts-taglib或jstl..?