1. index:jsp
原
<% Object user = session.getAttribute("user"); if(user == null){ %> <a href="<%=request.getContextPath()%>/login.jsp">登录</a> <a href="<%=request.getContextPath()%>/register.jsp">注册</a> <% }else{ %> 当前登录用户: ${user.username } <% } %>
现
2. goods_list.jsp
原
<% List<Goods> list = (List<Goods>)request.getAttribute("list"); for(Goods goods : list){ %> <tr> <td><%=goods.getName() %></td> <td><%=goods.getDes() %></td> <td><%=goods.getPrice() %></td> <td><%=goods.getInventory() %></td> <td>delete modify</td> </tr> <% } %>
现