一个老问题,Cannot create iterator for this collection,谢谢 ViewForm.add("set");---------------> ViewForm.add(set);ok~ 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 actionFormBean错了应该写成 :private String[] infoname; 在你的action也漏了:Collection httpServletRequest.getSession().removeAttribute("xxx");httpServletRequest.getSession().setAttribute("xxx", xxx);httpServletRequest.setAttribute("viewAFB", viewForm);return actionMapping.findForward("view"); 楼上的: dreamnear(哟哟),这位也说对了 谢谢高手们的帮忙,不过偶还是不懂在你的action也漏了:Collection httpServletRequest.getSession().removeAttribute("xxx");httpServletRequest.getSession().setAttribute("xxx", xxx);httpServletRequest.setAttribute("viewAFB", viewForm);-----------------------是什么意思啊 这个是指如果你的循环中有text框,那么ActionForm中要用数组来对应.另外楼主你的ActionForm中大小写要注意 public String getinfoname() { return infoname; } public void setinfoname(String infoname) { this.infoname = infoname; }->应该是 public String getInfoname() { return infoname; } public void setInfoname(String infoname) { this.infoname = infoname; }别粗心了. 谢谢sagittarius1979(射手爱狮子)您说问题,还有前文的问题我都有改过了,不过还是那句“Cannot create iterator for this collection”.....再不行,只好把ArrayList读出来,在页面上显示了,不过那样,又不符合struts的思想了 刚才我仔细的看了看,在你的action: ArrayList ViewForm=new ArrayList(); while(rs.next()) { ....我认为这样做没有必要,呵呵这个完全可以删除的,你对collection和vector还没有很好的理解如果要是按照楼主的这样做,那就要在actionForm中把元素都变成:String[] xxx struts2 中File类型转换成Byte[]类型 这个怪异的java究竟是什么意思?????????????????????? 如何显示classes文件夹啊 Tomcat配置SSL问题 sturts做分页空指针异常~ hibernate的问题 都帮帮我 帮我的是好人 集合类自动排序 弱弱的问问,一般面试JAVA和J2EE大概会问什么? 异常:/hibernate.cfg.xml not found jboss中如何设置连接池信息,我的数据库是用的oracle,急!!!!!!!! ejb开发的问题 谁能告诉我,救急!解决马上给分
应该写成 :private String[] infoname;
在你的action也漏了:Collection
httpServletRequest.getSession().removeAttribute("xxx");
httpServletRequest.getSession().setAttribute("xxx", xxx);
httpServletRequest.setAttribute("viewAFB", viewForm);
return actionMapping.findForward("view");
在你的action也漏了:Collection
httpServletRequest.getSession().removeAttribute("xxx");
httpServletRequest.getSession().setAttribute("xxx", xxx);
httpServletRequest.setAttribute("viewAFB", viewForm);
-----------------------
是什么意思啊
public String getinfoname() {
return infoname;
}
public void setinfoname(String infoname) {
this.infoname = infoname;
}->
应该是 public String getInfoname() {
return infoname;
}
public void setInfoname(String infoname) {
this.infoname = infoname;
}别粗心了.
您说问题,还有前文的问题我都有改过了,不过还是那句“Cannot create iterator for this collection”.....再不行,只好把ArrayList读出来,在页面上显示了,不过那样,又不符合struts的思想了
ArrayList ViewForm=new ArrayList();
while(rs.next())
{
....
我认为这样做没有必要,呵呵
这个完全可以删除的,你对collection和vector还没有很好的理解
如果要是按照楼主的这样做,那就要在actionForm中把元素都变成:
String[] xxx