JSP/JSP
[jsp] 6. detail 제품상세페이지 만들기
congs
2023. 5. 11. 14:44
https://jungeun980906.tistory.com/318https://jungeun980906.tistory.com/318
1. web에 datail.jsp 생성
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>제품 상세 정보 페이지</title>
</head>
<body>
<h3>detail 제품 상세 정보 페이지</h3>
<table border="1">
<tr>
<th>번호 pno</th>
<td>${pvo.pno }</td>
</tr>
<tr>
<th>상품명 pname</th>
<td>${pvo.pname }</td>
</tr>
<tr>
<th>가격 price</th>
<td>${pvo.price }</td>
</tr>
<tr>
<th>등록일자 regdate</th>
<td>${pvo.regdate }</td>
</tr>
<tr>
<th>세부내용 madeby</th>
<td>${pvo.madeby }</td>
</tr>
</table>
<!-- 이동 버튼 -->
<a href="modify.pd"><button type="button">수정</button></a>
<a href="remove.pd"><button type="button">삭제</button></a>
</body>
</html>
2. list 페이지에서 어떤것을 선택해서 detail에 들어왔는지 쿼리스트링 달기 (list.jsp에서)
3. ProductController에 case "/detail.pd" 추가
이제 detail밑줄을 눌러가면서 register-insert만드는 것처럼 계속 만들기 진행..
https://jungeun980906.tistory.com/318
출력 화면
list.jsp 에서 상품을 클릭하면,
해당 상품의 detail.jsp로 이동! (쿼리스트링으로 pno의 값을 담아가는 것을 확인가능)