用sturts2写一个增删改查,列表页面的值取不到。用sturt2标签。
解决方案 »
- Eclipse 和 myeclipse 我到看看那种在java界更受欢迎(做java都进来看看)
- 彩信发送程序中关于内容的问题(两个) 请做过彩信开发的朋友们关注
- 不用HTML在线编辑器怎么写转换代码录入数据库?
- 请教一个关于contentType问题
- 关于在页面上显示ActionErrors的问题求教
- iframe的打印预览问题:如何让打印预览只显示iframe里边的信息
- 如何使用jdkdocs?
- 请问怎样在javascript中打开一个word文档,并且是只读的,不能修改word里面内容!?
- rs.getString("idcard") 显示乱码怎么办啊?
- 几个SESSION有可能同时写一个文件时怎么办?
- 还没吃饭的高手进来,问个简单问题
- JSP验证码问题
[Struts2] Struts2 Data Tags
http://silver8250.blogspot.com/2009/05/struts2-struts2-data-tags.html
request.setAtrebut("list",list);红色的是你从数据库中查到某个对象的集合。
在页面中
<s:iterator value="#request.list" var="variable">
<s:properties value="#variable.username">
<s:properties value="#variable.password">
<s:properties value="#variable.id">
<s:properties value="#variable.address">
。。
</s:iterator>
The Action instance is always pushed onto the value stack. Because the Action is on the stack, and the stack is the OGNL root, references to Action properties can omit the # er. But, to access other objects in the ActionContext, we must use the # notation so OGNL knows not to look in the root object, but for some other object in the ActionContext.具体请看官方文档……