怎么想用session最好,其他任何方法都应该是自己写了个session一类的处理机制

解决方案 »

  1.   

    你可以放到你的ActionForm中保存,在你的config.xml配置文件中将scope="session"(默认值:request),这样你的ActionForm在整个会话中会一直有效(只创建一次),当提交过来的东西有字段名一样时后面的会覆盖前面的值(包括不同提交页)
      

  2.   

    这种东西最好就是保存在session中,其他方法我想都是舍本逐末
      

  3.   

    将数据存放在FormBean中,同时设置scope='session'那么Formbean中就会保存相关的数据
      

  4.   

    最好放在session中,不再用的时候立即释放
      

  5.   

    ManageStudent delegate = new ManageStudent();
            Collection data = delegate.listStudent(param);
            listStudentStateActionForm.setStudents(data);<html:form  method="post" action="/listGraduateAction.do">
    <bean:define id="students" property="students" name="listGraduateActionForm"  type="java.util.Collection"/><bean:size id="size" name="students"/>
    <logic:equal name="size" value="0">
    </logic:equal><logic:notEqual name="size" value="0">
    <table class="sort-table" id="table-1" cellspacing="0">
    <thead>
    <tr>
    <td>学号</td>
                <td>学生姓名</td>
    <td>性别</td>
    <td>出生年月</td>
    <td>籍贯</td>
    <td>民族</td>
    </tr>
    </thead>
    <tbody>
             <logic:iterate id="studentVO"  name="students"  type="cc.c37c.gedumis.bean.PStudent">
     <tr>
    <td><bean:write property="studentNumber" name="studentVO"/>&nbsp;</td>
    <td><bean:write property="studentName" name="studentVO"/>&nbsp;</td>
    <td><bean:write property="sexLabel" name="studentVO"/>&nbsp;</td>
    <td><bean:write property="borntime" name="studentVO"/>&nbsp;</td>
    <td><bean:write property="nativePlace" name="studentVO"/>&nbsp;</td>
    <td><bean:write property="folkCode" name="studentVO"/>&nbsp;</td>
    </tr>
            </logic:iterate>
    </tbody>
    </table>
    </center>
    <script type="text/javascript">var st1 = new SortableTable(document.getElementById("table-1"),
    ["None","Number", "String", "String", "Date", "String","String", "String","String","None","None"]);</script>
    </logic:notEqual>
    </html:form><td width="10" rowspan="2">&nbsp;</td>        </tr>      </table>
          </td>  </tr>
    </table>