以前也遇到这个问题,没解决,只能用别的方法
我仔细想了想,jsp最后都要生成html返回给浏览器,而html好像没有能纪录list的元素吧,所以感觉是不能提交回去的。

解决方案 »

  1.   

    你的课程名称都是从数据库中取出来的,页面上的table应该作为整个的list提交,table中的数据也应该有相应的bean,在form中,应该有对应的list定义,例如List beanList = new ArrayList();  要想提交list表单,首先要改写ArrayList这个类public class AutoArrayList extends ArrayList { 
        public Object get(int index) {
            while (index >= size()) {
                add(new JBean());//list对应的bean类
            }
            return super.get(index);
        }
    } form中相应的List beanList = new ArrayList();  改为List beanList = new AutoArrayList();因为使用iterate在页面上显示,所以table要想提交,需要给list中的给一个属性赋给唯一标示,<logic:iterate id="beanList"  name="iForm" property="beanList" indexId="index">
    <td><html:text name="beanList" property="name" indexed="true"/>
    <td><html:text name="beanList" property="pass" indexed="true"/></td>
    </logic:iterate>加上 indexed="true"  就可以提交了
      

  2.   

    你是要提交后得到用户选择了哪些课吗?
    为什么要从request中取得是哪些课程呢?chekcbox不可以用吗?
      

  3.   

    <input type="checkbox" name="items" value=<bean:write name="course" property="value" scope="page"/> >在formbean中加个数组,就ok了一个同学帮我解决的,stupid , stupid me.