EL表達式循環後臺返回的數據生成table

<%@ taglib uri=“http://java.sun.com/jsp/jstl/core” prefix=“c” %>

@RequestMapping(value="/importPoData", method=RequestMethod.POST) 
public String importPurchaseOrder(HttpServletRequest request, @RequestParam MultipartFile myFileName, ModelMap modelMap) throws Exception {
	try {
		Boolean isExcel2003 = ExcelUtil.isExcel2003(myFileName.getOriginalFilename());
		List<ImportLogBase> errorList = orderService.importPoData(myFileName.getInputStream(), isExcel2003);
		modelMap.put("errorLogs", errorList);
		return "po/poImportLogs";
	} catch (IOException e) {
		e.printStackTrace();
	}
	return "importSuccess";
}
<table class="l-table-edit" border='1' id="testTable">
		<tr>
			<td colspan="4" class=""><font color="red" size="4">失敗原因如下</font></td>
		</tr>
		<tr>
			<td align="center" bgcolor="#E0EFF6"><strong>sheet</strong></td>
			<td align="center" bgcolor="#E0EFF6"><strong>行號</strong></td>
			<td align="center" bgcolor="#E0EFF6"><strong>提示信息</strong></td>
		</tr>
		<c:forEach items="${errorLogs}" var="item">
			<tr>
				<td>${item.sheet}</td>
				<td>${item.row}</td>
				<td>${item.description}</td>
			</tr>
		</c:forEach>
	</table>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章