JSP中循环时用到的代码
来源:互联网 发布:ubuntu不能切换输入法 编辑:程序博客网 时间:2024/05/17 15:03
在JSP页面中循环遍历某一集合,常用的有以下几种做法:
1、使用struts标签库及OGNL
如:
<s:iterator value="users" >
<tr>
<td>${id }</td>
<td>${username }</td>
<td></td>
<td>${address }</td>
<td><a href="<%=path %>/ssi/UserAction_deleteUserById?id=${id }">删除</a></td>
<td><a href="<%=path %>/ssi/UserAction_updateUserUI?id=${id }">修改</a></td>
</tr>
</s:iterator>
2、使用jstl
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:forEach items="${requestScope.users}" var="user">
<tr>
<td>${user.id }</td>
<td>${user.name }</td>
<td>${user.age }</td>
<td>${user.address }</td>
<td><a href="<%=path %>/UserAction_deleteUserById?id=${user.id }">删除</a></td>
<td><a href="<%=path %>/UserAction_updateUserUI?id=${user.id }">修改</a></td>
</tr>
</c:forEach>
- JSP中循环时用到的代码
- jsp用到的标签
- 一些很少用到但是用到时又很抓鸡的代码
- jsp中经常用到的变量数据类型转换例子
- jsp页面的中循环获取数据
- JSP中循环出半年的日历
- xss用到的代码
- 网页制作中经常用到的六则代码技巧
- MATLAB中代码编辑时候用到的快捷键
- 数据结构中,二叉树用到的算法代码综合
- 自动化测试中,用到File类的相关代码
- Android开发中经常会用到的功能代码
- Android开发中经常用到的代码模块
- Android开发中你总会用到的代码段
- jsp中forEach循环
- jsp中判断,循环
- jsp页面的循环、判断、截取列表的代码写法
- jsp连接access不用设置ODBC需要用到的代码例子
- MFC内部运行来龙去脉追踪
- OpenGL学习笔记(四)---画动态圆
- Invocation of init method failed could not instantiate test object
- 二叉树的非递归遍历
- 编译并使用boost库(win7+boost1.53+vs2012)
- JSP中循环时用到的代码
- Swift与Keystone认证问题,Permission denied: '/root/keystone-signing'
- QT自带QTcpServer架构分析
- 获取货币汇率API
- rank()随机函数的使用
- 第4章 商业蜂窝通信系统的典范-GSM
- 排列组合 poj Paths on a grid
- Stardict 字典下载地址(也是一Ubuntu源)
- 蓝桥杯(概率题)