🌞 Day 052
🎄 File Upload
🎁 class - ProductWriteAction
🎁 class - UpdateAction
🎁 수정 : productView.jsp
- 이미지 파일이 없는 경우 noname.jpg파일이 보이도록 수정
🎁 ProductDao
🎁 ActionFactory
🎄 게시판 - 수정
🎁 수정 : boardView.jsp
- upload폴더를 생성하고 noname파일도 넣어 놓는다.
🎁 수정
-
sql : board 테이블에 필드 추가 imgfilename
-
BoardDao
: 게시판 조회하는 메서드들에 아래 코드 추가
bdto.setImgfilename(rs.getString("imgfilename"));
-
boardWriteForm : 파일 올리는 input추가
-
WEB-INF > lib에 cos.jar 파일 복사해서 넣기
🎁 수정 : BoardWriteAction
🎁 수정 : BoardDao - insertBoard()
🎁 수정 : UpdateBoardAction
🎁 DB 준비 : ERMaster
- DataBase 폴더 만들기 ⇒ ERMaster파일 생성
- ERMaster로 테이블 설계하기 ⇒ 우클릭 > 내보내기 > DDL로 sql문으로 만들어서 실행
🎁 sample Data
- 시퀀스 생성
- view 생성
🎁 index.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<% response.sendRedirect("shop.do?command=index"); %>
</body>
</html>
🎁 Servlet - ShoppoingMallServlet
🎁 interface - Action
🎁 class - ActionFactory
🎁 class - IndexAction