[求教]Struts2标签里的id属性报无效错误

侠路相逢 2018-06-03 06:36:45
今天写了个JSP用Struts标签的iterator迭代,控制台报错:“Attribute [id] invalid for tag [iterator] according to TLD”
查看代码未发现原因,难道iterator的id属性被取消了?

请朋友们帮忙看看,谢谢!

JSP代码如下,recordsList为Action传过来的记录List.

<tbody style="font-size:8px;">
<s:iterator value="recordsList" id="r">
<tr>
<td class="center"><s:date name="#r.recTime" format="yyyy-MM-dd HH:mm:ss"/></td>
<td><s:property value="#r.lineNo"/></td>
</tr>
</s:iterator>
</tbody>


...全文
1484 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
强颜欢笑康 2018-08-28
  • 打赏
  • 举报
回复
Please make sure you have read the Tag Syntax document and understand how tag attribute syntax works.

The id attribute is deprecated in Struts 2.1.x, and has been replaced by the var attribute.

The begin, end and step attributes are only available from 2.1.7 on
verejava 2018-06-03
  • 打赏
  • 举报
回复
至简 实用 Java Web MVC 框架 http://www.verejava.com/

81,092

社区成员

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

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