strut2标签实现从数据库中取出数据分4行4列显示

           今天实现一个功能,从数据库读取相对路径,分页显示图片以及标题,且每页分4行4列显示


部分代码如下:


 <s:iterator value="pageBean.list"  status="st">
  <s:if test="#st.index % 4 == 0">
        <tr></tr>
   </s:if>
 <td>
  
   <a href="upload/<s:property value='fileName'/>">
   <img id="img"src="upload/<s:property value='fileName'/>" width="160px" height="140px"/></a>         
 


  <s:property value="title"/>

</td>


 
   </s:iterator>


你可能感兴趣的:(strut2标签实现从数据库中取出数据分4行4列显示)