-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproduct.jsp
43 lines (41 loc) · 1.32 KB
/
product.jsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<%--
Document : product.jsp
Created on : Oct 17, 2018, 3:01:46 PM
Author : DBGI
--%>
<%@page import="Store.Product"%>
<%@page import="Store.DataManager"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<%
String pid = request.getParameter("pid");
DataManager manager = new DataManager();
Product p = null;
if(pid != null){
p = manager.getProductInfo(pid);
}
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><%=p.getName()%></title>
</head>
<body>
<%@include file="header.jsp" %>
<div class="container">
<h1><%=p.getName()%></h1>
<div class="row">
<div class="col-lg-6 col-md-6 mb-4">
<img class="card-img-top" src="http://localhost:8080/WebStore/images/<%=p.getImg()%>" alt="">
</div>
<div class="col-lg-6 col-md-6 mb-4">
<%=p.getName()%><br>
<%=p.getDesc()%><br>
<%=p.getPrice()%><br><br>
<button class="primary">Buy Now</button>
</div>
</div>
</div>
<%@include file="footer.jsp" %>
</body>
</html>