在jsp页面中使用jstl标签
2017-02-15 17:58
871 查看
第一步:引入标签库
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
第二步:使用jstl标签的demo,jsp页面内容如下:
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
第二步:使用jstl标签的demo,jsp页面内容如下:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page import="com.fz.bean.Student"%> <%@ page import="java.util.*"%> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Bootstrap 实例</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css"> <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script> <script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script> </head> <body> <h1 align="center"> <b>*******</b> </h1> <div class="container"> <div class="row clearfix"> <div class="col-md-12 column"> <table class="table"> <thead> <tr> <th>编号</th> <th>姓名</th> </tr> </thead> <tbody> <c:forEach items="${listStudent}" var="student"> <tr> <td>${student.id }</td> <td>${student.name }</td> </tr> </c:forEach> </tbody> </table> </div> </div> </div> </body> </html>
相关文章推荐
- 笔记:Jsp页面国际化 – 使用jstl标签
- jsp jstl函数 用标签声明页面变量,供jstl使用,时间格式问题
- jstl标签在MyEclipse中的jsp页面使用报错
- MAVEN项目中JSP页面使用JSTL标签
- 如何在JSP页面使用JSTL标签获取List的元素个数
- JSP页面中使用JSTL标签出现无法解析问题解决办法
- 如何在JSP页面中使用JSTL标签实现if和if-else判断,判断条件使用<%=value%>
- jsp页面使用jstl标签格式化String类型日期
- JSP页面中使用JSTL标签出现无法解析问题解决办法
- jsp页面使用jstl标签
- Jsp页面中使用jstl 标签 步骤
- JSP使用jstl标签报错,jsp页面提示找不到build path
- JSP页面中使用JSTL标签出现无法解析问题解决办法
- JSP页面中使用JSTL标签出现无法解析问题解决办法
- JSP页面中EL表达式语言和jstl标签库的使用详解
- 如何在JSP页面中使用JSTL标签实现if和if-else判断
- jsp页面中使用JSTL标签库的<c:redirect>的一些看法和疑问?
- jstl标签在MyEclipse中的jsp页面使用报错
- jsp页面中使用JSTL标签库的<c:redirect>的一些疑问?
- 出现 JSP页面中使用JSTL标签无法解析 错误的原因及解决方法