解决方案 »

  1.   

    更新信息:
    介绍:各位大侠,这里用的是struct1,在register.jsp的form表单中新添加了三个字段 academy,studentIDs,classID。这三个字段我在服务器端用request.getParameter("classID")的方式能够获取填写的内容,但是用studentForm.getStudentIDs()的方式得到的确实空。为什么啊 同样是得到studentIDs,第一个得到是空,第二个有值
        private ActionForward studentAdd(ActionMapping mapping, ActionForm form,
                HttpServletRequest request, HttpServletResponse response) {
            StudentForm studentForm = (StudentForm) form;
            System.out.println("tchl student id"+studentForm.getStudentIDs());
            System.out.println("tchl student studentIDs"+request.getParameter("studentIDs"));
      

  2.   

    是Struts吧  楼主我也是刚学  不过我学的是struts2
      

  3.   

    现在这份代码是struct1 的 ,没办法啊
      

  4.   


    我这个代码只是在原来form中添加了三个值,新添加的值这种方法studentForm.getStudentIDs() 读到的是空。而原来的form表中有的值却可以得到。
    郁闷李
      

  5.   

    大概的流程是对的,把你的studentForm类里的set方法的返回值设为void试试,不需要返回值,只需要把成员变量赋值就行了