摘要: 在说明s:iterator标签的使用前,先了解下struts2中的Value Stack。这里参考了webwork中对Value Stack的描述,由于struts2是在webwork的基础上进行升级的,因此webwork对于Value Stack的表述同样适用于struts2。在这里不描述Value Stack具体做什么,但有两点需要注意:一个value stack本质上是一个List;在栈中调用[n]将返回一个从位置n开始的子栈;对于2举个例子说明。假定Value Stack包含了[model,action,others],那么[0] --- 返回 [model,action,others 阅读全文
posted @ 2011-04-22 12:03 Horrison 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 首先引入Struts的标签库<%@taglib prefix="s" uri="/struts-tags"%>如取得action中User 对象的name属性,应该用el表达式这样写${User.name}${}是EL语言的 %{}形式是ognl表达式语言的,在struts2的标签内部,使用%{}这样的形式,在标签外部可以使用${}EL语言的方式。在struts2的标签内部不允许使用${}这样的形式。下文转至:http://www.blogjava.net/amigoxie/archive/2007/07/29/133087.html说明:本 阅读全文
posted @ 2011-04-22 10:06 Horrison 阅读(1440) 评论(0) 推荐(0) 编辑