急求一问题!!!

hyowner 2009-12-31 03:06:28
  看图 为什么编号不能自动增加啊?

<form name="messageList" id="message">
<table border="1" width="90%">
<tr align="center">
<td>编号</td>
<td>标题</td>
<td>内容</td>
<td>创建日期</td>
<td>操作</td>
</tr>

<tr>
<logic:empty name="messageList">
<td>
<font color="red" face="宋体">没有符合条件的数据</font>
</td>
</logic:empty>
</tr>

<logic:notEmpty name="messageList">
<logic:iterate id="message" name="messageList">
<tr align="center">
<td>
<bean:write name="message" property="id"/>

</td>

<td>
<bean:write name="message" property="title"/>
</td>

<td>
<bean:write name="message" property="content"/>
</td>

<td>
<bean:write name="message" property="datetime" format="yyyy-mm-dd"/>
</td>
<td><a href="addMessage.jsp">添加</a>|<a href="up.do">修改</a>|<a href="delete.do?id=${id} }">删除</a>
</td>
</tr>
</logic:iterate>
</logic:notEmpty>
</table>

这是JSP的代码!!用的struts框架,该如何修改了 要让编号这列自动递增的显示如1,2,3...........
...全文
98 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhangkang0808 2010-01-02
  • 打赏
  • 举报
回复
解决过了!
hyowner 2010-01-02
  • 打赏
  • 举报
回复
楼上的大侠能详细点吗?
crazylaa 2009-12-31
  • 打赏
  • 举报
回复
一般在取lst的时候就做好了。
帮顶。
VilenZYP 2009-12-31
  • 打赏
  • 举报
回复
我一般在list里面就把id处理好。。呵呵
hyowner 2009-12-31
  • 打赏
  • 举报
回复
图怎么贴啊 晕
hyowner 2009-12-31
  • 打赏
  • 举报
回复
补个图
wflyxiaonian 2009-12-31
  • 打赏
  • 举报
回复
<c:forEach items="${datas}" var="item" varStatus="vs">

编号:${vs.count}

81,091

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧