我的list中每条记录包括name,introduce,location,img等数据,而每条记录通过JSP展示的格式如下:
name location
----------
img |introduce
|
|请问要想实现这样的格式,怎样通过struts实现?
name location
----------
img |introduce
|
|请问要想实现这样的格式,怎样通过struts实现?
解决方案 »
- 求助啊,关于struts1 的request问题
- JDBC数据库连接不上丢人的问题
- 高分求比较好的JSP聊天室!!!
- sevlet中读取session的问题,在线等
- 在tomcat下配置连接池出错了,请各位帮忙看看
- 谁来 回答 action 地址之怪现状?
- 刚设计制作的网站荆州市妇幼保健院“金色未来” 亲子园,欢迎网友访问,并提出改进意见!(比如 美工上,内容上和其他方面哪些地方要改进
- 100求救!!高手进来帮帮忙吧!!!!
- 急。用户登陆后,需要在他关闭所有页面后注销其登陆,该怎么做
- 在Jbuildr6中做好的***.jpx(一个 jsp Project)怎样在IE中浏览
- 小弟跪求解答...
- 新人,关于画表的一个很简单的问题!请帮助!
<table border="1">
<tr>
<td height="20px">name:somebody</td>
<td>location:somewhere</td>
</tr>
<tr>
<td colspan="2"><hr></td>
</tr>
<tr>
<td height="100px"><img src="..." border="0"></td>
<td>introduce:somewords</td>
</tr>
</table>则这样迭代你的list(假设该list的名称为infoList)
<logic:iterator name="infoList" id="il">
<table border="1">
<tr>
<td height="20px">name:<logic:write name="il" property="name"/></td>
<td>location:<logic:write name="il" property="location"/></td>
</tr>
<tr>
<td colspan="2"><hr></td>
</tr>
<tr>
<td height="100px"><img src="<logic:write name='il' name='img'/>" border="0"></td>
<td>introduce:<logic:write name="il" property="introduce"/></td>
</tr>
</table>
</logic:iterator>以上为举例说明,具体页面情况根据你自己的情况看
PS:本人好久没用struts了,标签有用错的地方你自己更正下