productinfo.jsp
来自「MasteringEJB20 Code Sample Include Sessi」· JSP 代码 · 共 29 行
JSP
29 行
<%--This JSP displays details of the selected product.
Customer can add this item to the shopping cart by clicking on add to cart link.
Customer has provision to navigate to the catalog as well as to the shopping cart pages.
--%>
<%@ page import="examples.ProductItem" %>
<html>
<head><title> Jasmine's Product Info page</title></head>
<body>
<jsp:include page="title.jsp" />
<jsp:directive.page errorPage="error.jsp" />
<%
//Retrieves the productItem from request object and displays.
ProductItem item=(ProductItem)request.getAttribute("productItem");
%>
<b><%=item.getName()%><b>
<h4> Description:</h4>
<%=item.getDescription()%>
<h4>Base price (before discounts):<%=item.getBasePrice()%></h4>
<center>
<A href="/jasmine/catalog?Buy=<%=item.getProductID()%>">Add this item to Cart</A><br>
<A href="/jasmine/catalog">See the Catalog</A><br>
<A href="/jasmine/showQuote">View Current Shopping Cart</A>
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?