jsp jstl的使用
1)下载jstl.jar和standard.jar文件,然后将其拷贝到tomcat的lib目录下。
具体的下载地址:http://mirrors.ccs.neu.edu/Apache/dist/jakarta/taglibs/standard/binaries/jakarta-taglibs-standard-1.1.2.zip
2)创建web工程,配置jsp-conifg H) JSP-CONFIG设置JSP页面
3) 在jsp页面中通过JSP taglib引入对应的标签库
如下:
web.xml的版本为2.3
web.xml文件配置(使用该版本的配置出现的问题 EL表达式无法使用):
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
<display-name>Archetype Created Web Application</display-name>
<taglib>
<taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
<taglib-location>/WEB-INF/tld/fmt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/tld/c.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/fn</taglib-uri>
<taglib-location>/WEB-INF/tld/fn.tld</taglib-location>
</taglib>
</web-app>

jsp中引入该标签库
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="gs"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
out标签输出信息:
<gs:out value="this is tag Value!"></gs:out>
</body>
</html>
web.xml版本2.5
解决EL表达式无法使用的问题
jsp jstl的使用的更多相关文章
- NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
今天调试SSM框架项目后台JSOn接口,报出来一个让人迷惑的错误:NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config 上网查了一下别人的博 ...
- springMVC: java.lang.ClassNotFoundException: javax.servlet.jsp.jstl.core.Config
springMVC开发web的时候,报错:java.lang.ClassNotFoundException: javax.servlet.jsp.jstl.core.Config 原因:未引入jstl ...
- J2EE中使用jstl报http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar错
一.发现问题 运行引用了jstl的jsp页面 报http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or th ...
- JSP JSTL EL
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> Html代码 复制代 ...
- 【JSP jstl c标签】使用c:foreach 报错(警告)”test does not support runtime expressions“
后台封装的数据是个list,传递给前台,显示如下: <c:forEach items="${userInfo}" var="user"> 用户Nam ...
- 使用Jstl异常:The absolute uri: http://java.sun.com/jsp/jstl/core cannot&nbs
错误提示是: org.apache.jasper.JasperException: This absolute uri 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" 主要的愿 ...
- The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar
出现 The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the j ...
- http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed wit
异常:The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the j ...
- 关于jstl的问题:The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed
Current sofeware:java Eclipse ee 4.5.2 + Tomcat 6.0 Question: 在tomcat中部署好了我的项目,然后发布后没有报错.但是当在浏览器打开的时 ...
随机推荐
- 如何让VS2012编写的程序在XP下运行
Win32主程序需要以下设置 第一步:在工程属性General设置 第二步:在C/C++ Code Generation 设置 第三步:SubSystem 和 Minimum Required Ve ...
- Python3基础 time.localtime 当前系统的年月日 时分秒
Python : 3.7.0 OS : Ubuntu 18.04.1 LTS IDE : PyCharm 2018.2.4 Conda ...
- C#预处理器指令【转】
本文转载自:http://www.cnblogs.com/miffylf/p/4005223.html C#有许多名为预处理器指令的命令.这些命令从来不会转化为可执行代码中的命令,但会影响编译过程的各 ...
- 【第十四章】 springboot + profile(不同环境读取不同配置)
具体做法: 不同环境的配置设置一个配置文件,例如:dev环境下的配置配置在application-dev.properties中:prod环境下的配置配置在application-prod.prope ...
- java的Date() 转换符
本字段下均转自 csdn 阿念1989 本文是学习网络上的文章时的总结,感谢大家无私的分享. System.out.printf()方法可以对日期做处理输出. 对应列表 转换符 类型 举例 c 完整的 ...
- 如何给域名配置https证书
http和https的区别就是,后者在网络传输过程中会很安全,原因就是给http安装了SSL证书. SSL证书有免费的和收费的,收费的顾名思义就是保护的方面更多,更安全.收费的像单域名的一年有几百.几 ...
- java代码实现highchart与数据库数据结合完整案例分析(一)---饼状图
作者原创:转载请注明出处 在做项目的过程中,经常会用到统计数据,同时会用到highchart或echart进行数据展示,highchart是外国开发的数据统计图插件, echart是我们国家开发的数据 ...
- Centos下挖XMR门罗币的详细教程
很多朋友都看过我之前写的Ubuntu下挖XMR门罗币的教程,也有很多朋友提出,为什么不写个Centos的教程出来,今天我在这里就写个Centos的教程,看这个教程前,大家先看看之前的教程,因为里面涉及 ...
- iBatis的CRUD操作详细总结
昨天晚上看了一下关于iBatis的一个讲解的视频,讲的和我的这个简单的总结差不多.... 思考了一下还是把主要操作都总结一下吧,当然这里也不是全的,知识简单的CRUD... 首先我觉得持久层的操作主要 ...
- Ubuntu 14.04设置开机启动脚本的方法
rc.local脚本 rc.local脚本是一个ubuntu开机后会自动执行的脚本,我们可以在该脚本内添加命令行指令.该脚本位于/etc/路径下,需要root权限才能修改. 该脚本具体格式如下: #! ...