问题描述

今天写jsp的时候想用JSTL的一些标签,但是引用的时候碰到这个问题。

解决办法

一.看是否引用jstl.jar包,如果没有,则可以下载相应版本的jstr.jar包,并放入WEB-INF的lib文件夹下

二.应该下载什么版本的jstl包?

(一)JSTL各版本下载

(1)JSTL1.0(包含2个jar文件:jstl.jar和standard.jar。这两个jar文件都存在于Standard1.0.x的发布版本中。)

下载地址:http://archive.apache.org/dist/jakarta/taglibs/standard-1.0/binaries/

最新版本是:jakarta-taglibs-standard-1.0.3.zip。解压后从lib文件夹中找到这个两个jar包

(2)JSTL1.1(也包含2个jar文件:jstl.jar和standard.jar。这两个jar文件都存在于Standard1.1.x的发布版本中。)

下载地址:http://archive.apache.org/dist/jakarta/taglibs/standard/binaries/

最新版本是:jakarta-taglibs-standard-1.1.2.zip。解压后从lib文件夹中找到这个两个jar包

(3)JSTL1.2(只包含1个jar文件:jstl-1.2.jar)

-- JSTL 1.2 is part of the Java EE 5 platform.

下载地址:http://jstl.java.net/

(二)JSTL各版本差异

1. JSTL1.0(不支持EL)、JSTL 1.1和JSTL 1.2支持的servlet,jsp规范都不相同,支持相应规范的tomcat的版本也有要求的。具体如下。

web.xml中要申明相应的servlet版本。

web.xml的位置:

JSTL1.2需要servlet2.5

<web-app xmlns="http://java.sun.com/xml/ns/javaee"

version="2.5"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

JSTL1.1和JSP2.0需要servlet2.4

<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4 " xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4 .xsd">

JSTL1.0和JSP1.2需要servlet2.3

<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.3 " xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_3 .xsd">

2. JSTL1.0和JSTL1.1的uri是不一样的,但是他们的tld文件同时存在于同一个standard.jar中。解压缩下载的standard.jar,你会在/META-INF/下发现有一个c-1_0.tld,还有一个c.tld。其中c-1_0.tld是JSTL1.0的core标签库的tld文件,c.tld是JSTL1.1的core标签库的tld文件。JSTL1.1与JSTL1.2的uri是一样的。

JSTL1.0的使用方法为:

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

JSTL1.1的使用方法为:

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

JSTL1.2的使用方法为

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

 

开启EL:只有 servlet2.4 是默认支持 el表达式的。

其他的都要 JSP页面开头加入: <%@ page isELIgnored="false"%>servlet2.5默认是禁用el的,所以会出现${}现象,加入上述代码开启EL

参考文档

  http://janedoneway.iteye.com/blog/1245949

Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core"的更多相关文章

  1. java cannot find the tag library descriptor for "http://java.sun.com/jsp/jstl/core"

    出现java cannot find the tag library descriptor for "http://java.sun.com/jsp/jstl/core" 主要的愿 ...

  2. struts标签错误:Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core"

    今天使用eclipse开发ssh,出现Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/co ...

  3. 关于jsp中jstl报错Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core

    有的时候在开发jsp时,需要使用jstl时,在jsp上面引用jstl却出现错误:Can not find the tag library descriptor for "http://jav ...

  4. Can not find the tag library descriptor for "http://java.sun.com/jsp/jst1/core

    主要是缺少两个包: jstl.jar下载地址: http://repo2.maven.org/maven2/javax/servlet/jstl/ standard.jar下载地址: http://r ...

  5. Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/co

    转自:https://www.xuebuyuan.com/934357.html 需要引入standard.jar和jstl.jar 正确添加即可

  6. 使用jstl报错:Can not find the tag library descriptor for “http://java.sun.com/jstl/core”

    使用jstl报错:Can not find the tag library descriptor for “http://java.sun.com/jstl/core” 出现这个错误的原因是项目中没有 ...

  7. 关于jstl taglib的错误 Can not find the tag library descriptor for “http://java.sun.com/jstl/core”

    在查了N个帖子之后,决定记录一下关于jstl taglib的配置方法. 首先我遇到的错误是: Can not find the tag library descriptor for "htt ...

  8. Eclipse can not find the tag library descriptor for http://java.sun.com/jsf/*

    问题页面: <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <%@ ta ...

  9. Can not find the tag library descriptor for “http://java.sun.com/jstl/core"

    此文原博文地址:https://blog.csdn.net/kolamemo/article/details/51407467 按照查到的资料,JSTL taglib需要jstl.jar来支持.在1. ...

随机推荐

  1. AngularJS ui-router刷新子页面路由

    网上有各种刷新子页面路由的方法,但是不知道为什么放到我的页面就不行了,尴尬! 网上的方法有: <a href="#" ui-sref="app.toMenu&quo ...

  2. Android中处理崩溃闪退错误

    Android中处理崩溃闪退异常 大家都知道,现在安装Android系统的手机版本和设备千差万别,在模拟器上运行良好的程序安装到某款手机上说不定就出现崩溃的现象,开发者个人不可能购买所有设备逐个调试, ...

  3. centos7下安装rabbitmq

    RabbitMQ: RabbitMQ是流行的开源消息队列系统,是AMQP(Advanced Message Queuing Protocol高级消息队列协议)的标准实现,用erlang语言开发.Rab ...

  4. springcloud 入门 11 (Hystrix Dashboard)

    hystrix: 断路器我在前面已经介绍,不了解的可以参考 :springcloud 入门 6 (断路器hystrix)  关于搭建,测试我都在这里面进行说明了,这章介绍的是  Hystrix Das ...

  5. scrapy简单分布式爬虫

    经过一段时间的折腾,终于整明白scrapy分布式是怎么个搞法了,特记录一点心得. 虽然scrapy能做的事情很多,但是要做到大规模的分布式应用则捉襟见肘.有能人改变了scrapy的队列调度,将起始的网 ...

  6. 减少MySQL主从延迟的神器--并行复制大揭密

    1. 简介 MySQL 5.6引入了基于schema的并行复制,即如果binlog events操作的是不同schema的对象,不是DDL,且操作的对象没有对其他schema的foreign key关 ...

  7. go time类操作

    fmt.Println(time.Now().Format("2006-01-02 15:04:05")) # 这是个奇葩,必须是这个时间点, 据说是go诞生之日, 记忆方法:6- ...

  8. fedora 使用 vnc 远程 fedora 28 主机

    问题重述: 最近环境中需要使用 fedora 28 来进行远程桌面,于是就重新配置了一下vnc 在这里面做一下记录. 过程: yum 安装: 工作机上安装 vncviewer 远程主机上安装: vnc ...

  9. python中的轻量级定时任务调度库:schedule

    提到定时任务调度的时候,相信很多人会想到芹菜celery,要么就写个脚本塞到crontab中.不过,一个小的定时脚本,要用celery的话太“重”了.所以,我找到了一个轻量级的定时任务调度的库:sch ...

  10. Iris框架源码阅读和分析

    iris包结构简介 iris包含了很多包,下面这些是分析过程中接触到的东西. 能力有限,多多包涵,欢迎联系QQ:2922530320 一起交流 context包包含: Context (接口) con ...