Action和页面间迭代标签等传值
2014-03-17 10:01
381 查看
使用C标签:
Action(Servlet)中,
request.setAttribute("proList", proService.list());
Jsp中,
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
<c:forEach items="${ requestScope.proList}" var="pro">
${pro.Id}
使用Struts标签:
Action(继承ActionSupport)中,
ActionContext.getContext().put("proList", proService.list());
Jsp中,
<%@ taglib prefix="s" uri="/struts-tags"%>
<s:iterator value="proList"> —— 注意属性 status,使用status="proIndex" ——获取序列号,从0开始, 即${proIndex.index + 1} 为1
${Id}
Action(Servlet)中,
request.setAttribute("proList", proService.list());
Jsp中,
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
<c:forEach items="${ requestScope.proList}" var="pro">
${pro.Id}
使用Struts标签:
Action(继承ActionSupport)中,
ActionContext.getContext().put("proList", proService.list());
Jsp中,
<%@ taglib prefix="s" uri="/struts-tags"%>
<s:iterator value="proList"> —— 注意属性 status,使用status="proIndex" ——获取序列号,从0开始, 即${proIndex.index + 1} 为1
${Id}
相关文章推荐
- Struts2:通过action标签向页面传值
- Struts2:通过action标签向页面传值
- Struts2:通过action标签向页面传值
- Struts2:通过action标签向页面传值
- jsp页面传值到action,命名name,对象自动接收
- struts2前台页面传值到action的三种方式
- struts2的s:iterator标签在jsp页面获取action中数组对象
- Struts2 Ajax---Action传值到JSP页面 Json格式
- <a>标签跳转action并在新窗口中显示返回页面
- struts2中jsp页面传值到action方式总结
- Struts2中在Action里面向前端页面传值的方法总结
- Struts2常用标签的使用以及Action传值
- Action向页面传值
- struts2中关于jsp页面向action传值出现乱码问题
- STRUTS2--JSP页面向Action中Set类型成员中传值
- 从Action中传值到JSP页面的方法
- 史上最全的CSS hack方式一览 jQuery 图片轮播的代码分离 JQuery中的动画 C#中Trim()、TrimStart()、TrimEnd()的用法 marquee 标签的使用详情 js鼠标事件 js添加遮罩层 页面上通过地址栏传值时出现乱码的两种解决方法 ref和out的区别在c#中 总结
- 在struts2中从jsp页面传值到action中
- struts2中jsp页面传值到action方式总结
- 在 struts2中从jsp页面传值到action中