⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 productsview.jsp

📁 网上购物车的JAVA代码实现版
💻 JSP
字号:
<%@page contentType="text/html;charset=GB2312"%>
<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@page import="java.util.*,feng.shoppingcart.biz.*,feng.shoppingcart.util.*,feng.shoppingcart.entity.*"%>
<html> 
	<body>   
	<center><hr/>
		<table border="0" width="100%" bgcolor="#879097"><tr><td>
		</td></tr></table><hr/>
		<center>
		<table border="0" width="90%" ><tr>
			<td><input name="image" type="image" src="image/tonight.jpg"/></td>
			<td>
				<center><h1><bean:message key="productsView_title"/></h1></center>
			</td>
			<td><html:image src="image/tonight.jpg" align="right"/>
			</td>
		</tr></table>
		</center><hr/>
		<table border="0" width="100%" bgcolor="#879097"><tr><td>
		</td></tr></table><hr/><p>&nbsp;</p>
		
<table border="2" width="60%"  bgcolor="#879097">
	<tr>
		<td><center><h2><bean:message key="productsView_row1_name"/></h2></center></td>
		<td><center><h2><bean:message key="productsView_row1_price"/></h2></center></td>
		<td><center><h2><bean:message key="productsView_row2_addproduct"/></h2></center></td>
	</tr>
	<c:forEach items="${sessionScope.products_list}" var="product" >
		<tr>
			<td><center><h3>${product.name}</h3></center></td>
			<td><center><h3>${product.price}</h3></center></td>
			<td><center><h3> 
				<a href="<%=request.getContextPath()%>/jsp/addItemToCart.do?id=${product.id}">
					<bean:message key="productsView_row2_addproduct"/>
				</a></h3></center>
			</td>
		</tr>
	</c:forEach>
	
</table>
<br>
<h2>
	<a href="<%=request.getContextPath()%>/jsp/cart.jsp">
      		<bean:message key="productsView_cart"/></a>&nbsp;&nbsp;
	<a href="<%=request.getContextPath()%>/jsp/operateOrder.do">
		<bean:message key="productsView_order"/></a>&nbsp;&nbsp;
	<a href="<%=request.getContextPath()%>/jsp/login.jsp">
		<bean:message key="productsView_login"/></a>&nbsp;&nbsp;
	<a href="<%=request.getContextPath()%>/jsp/out.do">退出</a>
</h2>
	</center>
	</body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -