问题描述

今天写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. Oracle 11g即时客户端在windows下的配置

    Oracle 11g即时客户端在windows下的配置 by:授客QQ:1033553122 instantclient-basic-nt-11.2.0.3.0.zip客户端压缩包为例 步骤 1. 假 ...

  2. Web API 方法的返回类型、格式器、过滤器

    一.Action方法的返回类型 a) 操作方法的返回类型有四种:void.简单或复杂类型.HttpResponseMessage类型.IHttpActionResult类型. b) 如果返回类型为vo ...

  3. Django中使用bookstarp框架(4)

    Django中使用bookstarp框架(4) 注意:要使用bookstarp框架前,要先有css的基础 因为主要是研究后台的使用方法,就引入前端的框架,简化html上的耗时(主要是不想把时间浪费在前 ...

  4. Python:GUI之tkinter学习笔记3事件绑定

    相关内容: command bind protocol 首发时间:2018-03-04 19:26 command: command是控件中的一个参数,如果使得command=函数,那么点击控件的时候 ...

  5. MySQL中MyISAM与InnoDB区别及选择

    InnoDB:支持事务处理等不加锁读取支持外键支持行锁不支持FULLTEXT类型的索引不保存表的具体行数,扫描表来计算有多少行DELETE 表时,是一行一行的删除InnoDB 把数据和索引存放在表空间 ...

  6. CentOS乱码解决方法

    linux 中文显示乱码解决办法, 其实是有多种情况的, 有一部分是由于终端默认的设置造成的 vi /etc/sysconfig/i18n 将内容改为LANG="zh_CN.GB18030& ...

  7. 静态库lib调试

    1.首先生成lib文件的解决方案编译通过. 2.将最新的lib和头文件在需要调用的exe中,替换掉. 3.复制需要调试的cpp文件到exe解决方案下,并添加现有项. 4.运行无错误后,添加断点即可调试 ...

  8. [ ArcGIS for Server 10.1 系列 ] - 重新创建Site

    一般当ArcGIS Server Site发生错误.ArcGIS Server无法启动或者ArcGIS Server某服务没有实例,就可能需要重新的创建Site.有时可以通过重新创建Site,就发现其 ...

  9. 433 模块 ARDUINO测试

    实验硬件 发射端 Arduino + 433超外差发射机     高,低电平和悬空三种模式切换  由简单的官方库修改 /* This is a minimal sketch without using ...

  10. 梯度下降(Gradient Descent)

    在求解机器学习算法的模型参数,即无约束优化问题时,梯度下降(Gradient Descent)是最常采用的方法之一,另一种常用的方法是最小二乘法.这里就对梯度下降法做一个完整的总结. 1. 梯度 在微 ...