首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

struts2怎么自动填充List<User>

2012-09-03 
struts2如何自动填充ListUserindex.jsp:input typetext nameuser.name /input typetext nam

struts2如何自动填充List<User>
index.jsp:

<input type="text" name="user.name" /> <input type="text" name="user.pwd" />
<input type="text" name="user.name" /> <input type="text" name="user.pwd" />
<input type="text" name="user.name" /> <input type="text" name="user.pwd" />


UserAction:
private List<User> list;
//省掉set,get方法


我用这种方法 ,为什么就报错了???
请问应该如何解决???

[解决办法]
写一个转换器就好了
 在你的Action同级目录下啊添加一个ActionName_conversion.properties 里面添加
Element_list=com.xx.xx.User

热点排行