bean标签
来源:互联网 发布:bedook祛痘怎么样知乎 编辑:程序博客网 时间:2024/06/14 11:54
项目引入struts后,在WEB-INF中会生成c.tld,struts-html.tld,struts-logic.tld等文件
在jsp中引用相应标签的tld文件。jsp中taglib里的uri和prefix分别对应tld文件中的uri和short-name:
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
1.<bean:write格式化输出:
<logic:iterator id="fwxx" name="list"> 此处id是随便起的元素别名,与下面的name值对应;name是一个集合
<bean:write name="fwxx" property="zj" format="#,###"/>元
<bean:write name="fwxx" property="date" format="yyyy年MM月dd日"/> //冒似fwxx对象必须有getDate()方法
</logic:iteartor>
2.<bean:define定义页面变量:
<bean:define id=""dataList type="java.util.List" name="list" scope="request"/> ——————>在request范围中取出list集合并重新命名为dataList
共找到<%=dataList.size()%>条数据
</bean:define >
3.<bean:size得到集合中数据总数:
<bean:size id="count" name="list"/>
共找到${count}条记录
4.<bean:message取得国际化资源
例如国际化资源中有:info.myKey = The numbers entered are {0},{1},{2},{3}
jsp中:<bean:message key=”info.myKey” arg0=”5” arg1=”6” arg2=”7” arg3=”8”/>
显示为:The numbers entered are 5,6,7,8
国际化编码语言转化:1.cmd——>native2ascii.exe
- bean标签
- Bean标签
- bean标签
- bean标签
- struts标签:bean标签
- Struts标签-BEAN标签
- struts标签---bean标签
- struts标签:bean标签(转贴)
- Struts - 标签库(Bean)
- struts Bean标签库
- struts标签-------bean
- Struts-Bean 标签库
- struts Bean 标签库
- Struts-Bean 标签库
- bean:write标签
- Bean 标签库
- Struts 标签-bean
- struts bean 标签
- 求一个月的天数
- camera接口介绍
- 问题
- SQLLoader学习示例1
- 俄罗斯方块准备起航
- bean标签
- 2012SCAU校赛题
- curl实现配置host
- synthesize只有一个变量指针 不会分配空间
- MS SQL Serve中的.mdf和.ldf
- sql 2008注入经验
- Android 利用【Hierarchy Viewer 】 工具学习别人的UI设计
- 谷歌浏览器扩展程序开发教程之创建你的第一个扩展程序
- WP7 pin to start 自定义应用程序的Tile