我的jsp中的错误taglib [英] Error taglib in my jsp

查看:128
本文介绍了我的jsp中的错误taglib的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用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

I have a project where i use Maven and Struts 1.3.10.

My dependencies in my 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>

I have errors in my JSP,

Example of 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> 

The problem is i have full of errors compared my taglib

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"

etc, etc...

why it's wrong

解决方案

Since the EL tags are generally unnecessary in today's server environments they're bundled separately. (They were before, too, but for different reasons.)

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

这篇关于我的jsp中的错误taglib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆