Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core"
问题描述
今天写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"的更多相关文章
- 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" 主要的愿 ...
- 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 ...
- 关于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 ...
- 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 ...
- 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 正确添加即可
- 使用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” 出现这个错误的原因是项目中没有 ...
- 关于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 ...
- 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 ...
- 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. ...
随机推荐
- 第一个Django页面(2)
第一个Django页面 1,进入forum项目:熟悉项目里各种文件的作用 2,配置URL:在urls.py里面添加 [url路径与对应的处理函数] 3,编写处理函数:根据urls.py里添加函数的路径 ...
- exception is feign.RetryableException: Connection refused (Connection refused) executing GET http://......
2018-03-23 10:00:58.430 ERROR 31889 --- [nio-4321-exec-7] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Se ...
- python包中__init__.py的作用
1.__init__.py定义包的属性和方法 一般为空文件,但是必须存在,没有__init__.py表明他所在的目录只是目录不是包 2.导入包的时候使用 例如有一个test目录,test下有xx1.p ...
- python第六十六天--sqlalchemy
#!usr/bin/env python #-*-coding:utf-8-*- # Author calmyan #python #2017/7/6 21:29 #__author__='Admin ...
- linux系统运行状态检查
目录 1 CPU状态检查 1.1 运行时间 1.2 CPU占用率 1.3 单核占用率 2 内存状态检查 2.1 内存占用率 2.2 交换分区占用率 3 磁盘状态检查 3.1 系统磁盘容量占用率 3.2 ...
- Python描述符 (descriptor) 详解
1.什么是描述符? python描述符是一个“绑定行为”的对象属性,在描述符协议中,它可以通过方法重写属性的访问.这些方法有 __get__(), __set__(), 和__delete__().如 ...
- Windows 10忘记登录密码不用怕,系统U盘/光盘轻松重置
我们有时会遇到忘记Windows10登录密码,或者电脑被其他账户登录后不知道密码无法开机的情况.遇到这些问题后,我们可能会借助一些第三方工具来移除现有密码.然而这些工具本身的安全性还有待检验,肯定不如 ...
- 阿里八八β阶段Scrum(4/5)
今日进度 黄梅玲: 图表绘制与实时更新的完成 刘晓: 数据分析表格部分生成完成 张岳: 初步完成简易的桌面控件 陈裕鹏: 事件添加TAG标签的功能完成,此外信息抽取算法也基本完成并PULL,但与项目产 ...
- Android Studio打开SDK更新对话框
再进行android自动化时,有时需要用到android的一些api,但苦于找不到 api文档,各种论坛查看是否有自己所需要的api,甚是麻烦.下面介绍如何通过 android studio将 and ...
- <20180930>故障解决记录Cisco RV系列低端路由
故障描述: 今日网络瘫痪 , 浏览器提示报 DNS出错, 故障现象: 网关能正常分配到IP但内网机器却无法上网. 其中一个WiFi设备竟然还可以通讯(聊天工具)! 故障思路和排查: 1.1 怀疑是上次 ...