struts2的多种类型转换

starc starc 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
html
<form method="get" action="insertSortAction.action">
<table>

<tr id="att"><td><span>属 性:</span></td>名称:<input type="text" name="attrib.key">值<input type="text" name="attrib.value"></td></tr>
<tr id="att"><td><span>属 性:</span></td>名称:<input type="text" name="attrib.key">值<input type="text" name="attrib.value"></td></tr>


<tr><td><input type="submit" value="提交"></td></tr>
</table>
</form>

Action
public class InsertSortAction extends ActionSupport {

private List<Attrib> attrib;



}



怎样接收页面传来对象,并加到List里
之前用类型转换可以做到,现在想在页面端用attrib.name,attrib.value传,怎么做
...全文
评论 7
收藏 已收藏
分享
返回顶部
starc
Java SE 62,621 成员 307,251 内容