【发布时间】:2017-03-29 07:16:06
【问题描述】:
我是 jsp 和 spring MVC 的新手。 我有一个jsp,它显示学生列表以参加表格中的复选框。 学生 jsp 包含学生表中的学生详细信息,复选框来自出勤表,我的 jsp 页面是这样的
jsp代码
<tr>
<th width="80">Student No</th>
<th width="120">Student Name</th>
<th width="120">Father Name</th>
<th width="60">Mobile No</th>
<th width="60">Present</th>
</tr>
<c:if test="${!empty studentsList}">
<c:forEach items="${studentsList}" var="student">
<tr>
<td>${student.studentId}</td>
<td>${student.studentName}</td>
<td>${student.fatherName}</td>
<td>${student.mobileNo}</td>
<td><form:checkbox path="attendance.presentFlag" /></td>
</c:forEach>
</c:if>
</table>
<div align="center">
<tr>
<td></td>
<td><input type="submit" value="Present" style="margin-top: 12px;"/></td>
</tr>
</div>
</form:form>
jsp 上方将显示带有复选框的学生列表。 现在我想根据复选框选中的标志将jsp中的修改列表提交到spring MVC控制器以存储在数据库中,任何人都可以建议我如何克服jsp表单提交到spring mvc,我无法得到做什么。我可以调用控制器的方法来提交列表。
【问题讨论】:
标签: java jquery spring servlets