我的 jsp 中的错误标记库
Error taglib in my jsp
我有一个使用 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>
问题是与我的标签库相比,我有很多错误
Can not find the tag library descriptor for
"http://struts.apache.org/tags-html-el"
Can not find the tag library descriptor for
"http://struts.apache.org/tags-logic-el"
等等等等...
为什么错了
由于 EL 标记在当今的服务器环境中通常是不必要的,因此它们被单独捆绑在一起。 (他们以前也是,但出于不同的原因。)
http://mvnrepository.com/artifact/org.apache.struts/struts-el/1.3.10
➜ struts jar tf struts-el-1.3.10.jar | grep tld
META-INF/tld/
META-INF/tld/struts-bean-el.tld
META-INF/tld/struts-html-el.tld
META-INF/tld/struts-logic-el.tld
META-INF/tld/struts-tiles-el.tld
我有一个使用 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>
问题是与我的标签库相比,我有很多错误
Can not find the tag library descriptor for "http://struts.apache.org/tags-html-el"
Can not find the tag library descriptor for "http://struts.apache.org/tags-logic-el"
等等等等...
为什么错了
由于 EL 标记在当今的服务器环境中通常是不必要的,因此它们被单独捆绑在一起。 (他们以前也是,但出于不同的原因。)
http://mvnrepository.com/artifact/org.apache.struts/struts-el/1.3.10
➜ struts jar tf struts-el-1.3.10.jar | grep tld
META-INF/tld/
META-INF/tld/struts-bean-el.tld
META-INF/tld/struts-html-el.tld
META-INF/tld/struts-logic-el.tld
META-INF/tld/struts-tiles-el.tld