标签:数据 lib orm page 分类 nbsp 删除 isp ade
作为视图,担当的角色就是显示数据。所以关键就是,借助JSTL的c:forEach标签遍历从CategoryServlet的list()的request.setAttribute("thecs",cs)传递过来的集合。
<c:forEach items="${从控制器传递过来的参数}" var="变量">
1 <%@ page language="java" contentType="text/html;charset=UTF-8" 2 pageEncoding="UTF-8" import="java.util.*"%> 3 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 <%@include file="../include/admin/adminHeader.jsp"%> 5 <%@include file="../include/admin/adminNavigator.jsp"%> 6 7 <script> 8 9 </script> 10 11 <title>分类管理</title> 12 <div class=""> 13 <h1 class="">分类管理</h1> 14 <br> 15 <br> 16 <div class=""> 17 <table class=""> 18 <thread> 19 <tr class=""> 20 <th>ID</th> 21 <th>图片</th> 22 <th>分类名称</th> 23 <!-- <th>属性管理</th>--> 24 <!-- <th>产品管理</th>--> 25 <th>编辑</th> 26 <th>删除</th> 27 </tr> 28 </thread> 29 <tbody> 30 <c:forEach items="" var=""> 31 <tr> 32 <td></td> 33 <td> 34 <img height="" src=""> 35 </td> 36 <td></td> 37 <!-- <td> 38 <a href=""> 39 <span class=""></span> 40 </a> 41 </td>--> 42 <!-- <td> 43 <a href=""> 44 <span class=""></span> 45 </a> 46 </td>--> 47 <td> 48 <a href=""> 49 <span class=""></span> 50 </a> 51 </td> 52 <td> 53 <a href=""> 54 <span class=""></span> 55 </a> 56 </td> 57 </tr> 58 </c:forEach> 59 </tbody> 60 </table> 61 </div> 62 <div class=""> 63 <%@include file="../include/admin/adminPage.jsp"%> 64 </div> 65 66 <div class=""> 67 <div class="">新增分类</div> 68 <div class=""> 69 <form method="" id="" action=""> 70 <table> 71 <tr> 72 <td>分类名称</td> 73 <td> 74 <input id="" name="" type="" class=""> 75 </td> 76 </tr> 77 <tr> 78 <td>分类图片</td> 79 <td> 80 <input id="" accept="" type="" name=""/> 81 </td> 82 </tr> 83 <tr class=""> 84 <td colspan="" align=""> 85 <button type="" class="">提交</button> 86 </td> 87 </tr> 88 </table> 89 </form> 90 </div> 91 </div> 92 </div> 93 94 <%@include file="../include/admin/adminFooter.jsp"%>
标签:数据 lib orm page 分类 nbsp 删除 isp ade
原文地址:https://www.cnblogs.com/Strugglinggirl/p/11863350.html