Result.jsp:
<%@ page language="java" import="java.util.*,xuyan.model.*" pageEncoding="gb2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
ArrayList al=(ArrayList)request.getAttribute("showresult");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>Result.jsp</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<form >
<div style="text-align: center">
<div style="text-align: center">
<table style="width: 578px; height: 76px; background-color: #ffff66;" border="2">
<tr>
<td style="font-weight: bold; width: 100px; color: blue">
编号:</td>
<td style="font-weight: bold; width: 100px; color: blue">
名称:</td>
<td style="font-weight: bold; width: 100px; color: blue">
单价:</td>
<td style="font-weight: bold; width: 100px; color: blue">
数量:</td>
</tr>
<tr>
<%
for(int i=0;i<al.size();i++)
{
GoodsBean gb=(GoodsBean)al.get(i);
%>
<td style="width: 100px; height: 48px;">
<%=gb.getGoodsID() %>
</td>
<td style="width: 100px; height: 48px;">
<%=gb.getGoodsName() %>
</td>
<td style="width: 100px; height: 48px;">
<%=gb.getGoodsPrice() %>
</td>
<td style="width: 100px; height: 48px;">
<div style="text-align: center">
<table style="width: 144px; height: 28px">
<tr>
<td style="width: 63px">
<input type="text" name="num2"></td>
<td style="width: 100px">
<a href="ShopServlet?flag=DeleteGoods">删除</a>
</td>
<td style="width: 100px">
<a href="ShopServlet">查看</a>
</td>
</tr>
</table>
</div>
</td>
</tr>
<%
}
%>
<tr>
<td style="width: 100px">
</td>
<td style="width: 100px">
<input type="button" value="删除全部书籍" /></td>
<td style="width: 100px">
<input type="submit" value=更改数量></td>
<td style="width: 100px">
</td>
</tr>
</table>
</div>
</div>
<div style="text-align: center">
<table border="2" style="width: 574px; height: 23px">
<tr>
<td style="font-weight: bold; width: 100px; color: red">
您共选择了价值()元的商品
</td>
<td style="width: 100px">
<input id="Button5" style="width: 101px" type="button" value="下一步" /></td>
</tr>
</table>
</div>
</form>
</body>
</html>