[英]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>
問題是我的taglib與我相比充滿了錯誤
找不到“ http://struts.apache.org/tags-html-el ”的標記庫描述符
找不到“ 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
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.