日期:2014-05-18  浏览次数:20748 次

struts里面怎么解决一次提交多个相同表单的问题?(附源码)
<%@   page   language= "java "   import= "java.util.* "   pageEncoding= "gb2312 "%>
<%@   taglib   uri= "http://jakarta.apache.org/struts/tags-bean "   prefix= "bean "%>  
<%@   taglib   uri= "http://jakarta.apache.org/struts/tags-html "   prefix= "html "%>
<%@   taglib   uri= "http://jakarta.apache.org/struts/tags-logic "   prefix= "logic "%>
<!DOCTYPE   HTML   PUBLIC   "-//W3C//DTD   HTML   4.01   Transitional//EN ">
<html>  
<head>
<title> JSP   for   LogonForm   form </title>
<link   rel= "stylesheet "   type= "text/css "   href= "/NY2T13-NewsManager/css/style.css ">

</head>

<body>
<table   width= "100% ">
<tr>
<td     class= "title1 "     style= "font-family: '华文楷体 '   ;   font-size:28px "> </td>
</tr>
</table>
<html:form   action= "/subject?method=check ">
<p   align= "center ">
<logic:present   name= "user "   scope= "session ">
你好, <bean:write   property= "username "   name= "user "/> 欢迎进入答题页面!
</logic:present>
</p>
<table   align= "center "   border= "0 ">
<thead>
<tr   class= "title1 ">
<th> 题号 </th>
<th> 题目 </th>
<th> 答案 </th>

</tr>
</thead>
<logic:present   name= "list "   scope= "session ">
<logic:iterate   id= "lists "   name= "list "   type= "com.accp.struts.form.SubjectForm ">
<logic:present   name= "lists ">
<tr>
<td> <bean:write   property= "number "   name= "lists "/> </td>
<td> <bean:write   property= "subject "   name= "lists "/> </td>
<td> <html:text   property= "answer "> </html:text> </td>
</tr>
</logic:present>
</logic:iterate>
</logic:present>

</table>
<p   align= "center "> <html:submit/> </p>
</html:form>
  <p   align= "center "> 当前有 <bean:write   name= "pageCount "/> 条 </p>
    <logic:present   name= "pagelist "   scope= "session ">
              <div   align= "center "   > <font   color= "red "     >
              <logic:iterate   id= "pagelist "   name= "pagelist ">
                [ <A   href= "/OnlineExam/page.do?method=1111&page= <bean:write   name= "pagelist "/> "> <bean:write   name= "pagelist "/> <