Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
product update and delete
- Loading branch information
Roshan Koshy Thomas
committed
Aug 25, 2022
1 parent
85c1e93
commit 47b06bc18f08dc5c1016118aacdf188914dad5e4
Showing
8 changed files
with
204 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
|
||
|
||
|
||
<%@page import="cfy.model.User"%> | ||
<%@page import="cfy.model.Product"%> | ||
<%@page import="java.util.List"%> | ||
<% | ||
Product prod = (Product) request.getAttribute("product"); | ||
%> | ||
|
||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>admin update page</title> | ||
|
||
<!-- font awesome cdn link --> | ||
<link rel="stylesheet" | ||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"> | ||
|
||
<!-- custom css file link --> | ||
<link rel="stylesheet" href="./css/admin.css"> | ||
|
||
</head> | ||
<body> | ||
|
||
|
||
|
||
<div class="container"> | ||
|
||
<div class="admin-product-form-container"> | ||
|
||
<form action="admin?action=update" method="post"> | ||
<h3>Update product</h3> | ||
<input type="text" value="<%=prod.getId()%>" name="product_id" | ||
hidden> | ||
<input type="text" placeholder="enter product name" | ||
name="product_name" class="box" value="<%=prod.getName()%>"> | ||
<input type="number" | ||
placeholder="enter product price" name="product_price" class="box" | ||
value="<%=prod.getPrice()%>"> | ||
<input type="text" | ||
placeholder="enter product details" name="product_details" | ||
class="box" value="<%=prod.getDetails()%>"> | ||
<input | ||
type="text" placeholder="enter product category" | ||
name="product_category" class="box" value="<%=prod.getCategory()%>"> | ||
<input type="submit" class="btn" name="add_product" | ||
value="update product"> | ||
</form> | ||
|
||
</div> | ||
|
||
|
||
|
||
</div> | ||
|
||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BIN
+631 Bytes
(110%)
target/classes/cfy/dao/ProductDao.class
Binary file not shown.
BIN
+224 Bytes
(110%)
target/classes/cfy/model/Product.class
Binary file not shown.
BIN
+615 Bytes
(120%)
target/classes/cfy/servlet/AdminPanel.class
Binary file not shown.