<%@ page language="java" import="java.util.*,org.easybooks.bookstore.vo.Greens" pageEncoding="utf-8" isELIgnored="false"%><%@ taglib prefix="s" uri="/struts-tags"%><script type="text/javascript"> setInterval(function () { window.location.reload(); }, 5000); // 单位: 毫秒, 1000 = 1 秒</script><html> <head><title>主页</title></head> <body> <s:property value="user.username"/>,您好!欢迎食堂售饭系统 <a href="addGreens.jsp">添加</a> <a href="welcome.jsp">首页</a><form action="select.action" method="post" name="formG"><table class="table table-striped table-hover table-bordered"> <thead> <tr align="center"> <th>名称</th> <th>价格</th> <th>数量</th> <th>操作</th> </tr></thead> <tbody> <% HttpSession s = request.getSession(); List list = (List)s.getAttribute("greens"); out.print(list.get(0)); Greens g =new Greens(); for(int i=0;i<list.size();i++){ g = (Greens)list.get(i); %> <tr><td><%=g.getName() %></td> <td><%=g.getPrice() %></td> <td><%=g.getNumber() %></td> <td> <a href="update.jsp?name=<%=g.getName()%>&price=<%=g.getPrice()%>&number=<%=g.getNumber() %>">修改</a></td> <td> <a href="deleteGreens.jsp?name=<%=g.getName()%>">删除</a></td> </tr> <% } %></tbody></table></form> </body></html>
添加回答
举报
0/150
提交
取消