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

📄 addproduct.jsp

📁 电子书店管理系统
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="../error.jsp" %>
<%@ include file="../jstl.inc"%>
<%@ taglib prefix="myfun" uri="http://hellking.com/function"%>

<jsp:useBean id="cart" class="com.jspdev.cart.Cart" scope="session"/>
<jsp:useBean id="item" class="com.jspdev.vo.Item" scope="page"/>
<jsp:useBean id="product" class="com.jspdev.vo.Product" scope="page"/>
<sql:query var="query" dataSource="${jspdev}" sql="select product.productId as productId,product.name as name,
item.listPrice as listPrice,item.unitCost as unitPrice,item.itemid as itemid,item.supplier  as supplier,
item.status as status,item.attr1 as attr1,item.attr2 as attr2,item.attr3 as attr3,item.attr4 as attr4,item.attr5 as attr5
 from product as product,item as item where  product.productId=item.productId  and item.itemid='${param.itemid}'"> 
</sql:query>
<c:forEach var="row" items="${query.rows}">
   <c:set target="${item}" property="itemId"     value="${row.itemid}"/>
   <c:set target="${item}" property="productId"  value="${row.productid }"/>
   <c:set target="${item}" property="listPrice"  value="${row.listprice }"/>
   <c:set target="${item}" property="supplier"   value="${row.supplier }"/>
   <c:set target="${item}" property="status"     value="${row.status }"/>
   <c:set target="${item}" property="attribute1" value="${row.attr1 }"/>
   <c:set target="${item}" property="attribute2" value="${row.attr2 }"/>
   <c:set target="${item}" property="attribute3" value="${row.attr3 }"/>
   <c:set target="${item}" property="attribute4" value="${row.attr4 }"/>
   <c:set target="${item}" property="attribute5" value="${row.attr5 }"/>   
   <c:set target="${product}" property="name" value="${row.name }"/>     
   <c:set target="${product}" property="productId" value="${row.productid }"/>    
   <c:set target="${item}" property="product" value="${product}"/>  
</c:forEach>
<c:if test="${myfun:addItem(cart,item,true)}">
<c:import url="viewCart.jsp"/>
</c:if>

⌨️ 快捷键说明

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