detail
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="/resources/js/jquery-3.5.1.js"></script>
<script type="text/javascript" src="/resources/js/reply.js"></script>
<script type="text/javascript" src="/resources/js/detail.js"></script>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<h1>Board_detail</h1>
<form name="frm1">
<table border="1" style="border-collapse: collapse">
<tr>
<td>번호</td>
<td><input type="hidden" id="bno" name="bno"
value="${detail.bno}" readonly>${detail.bno}</td>
</tr>
<tr>
<td>제목</td>
<td><input type="hidden" name="title" value="${detail.title}">${detail.title}</td>
</tr>
<tr>
<td>첨부파일</td>
<td><input type="hidden" name="file" value="image"></td>
</tr>
<tr>
<td>내용</td>
<td><input type="hidden" name="content"
value="${detail.content}">${detail.content}</td>
</tr>
<tr>
<td>수정일</td>
<td><input type="hidden" name="updatedate"
value="${detail.updatedate}">${detail.updatedate}</td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="수정하기"
onclick="btn_click('update')" /> <input type="submit" value="삭제하기"
onclick="btn_click('delete')" /></td>
</tr>
</table>
</form>
<ul id="replies">
</ul>
<div>
<textarea id="reply" name="reply" rows="10" cols="50"></textarea>
</div>
<div>
<input id="replyer" name="replyer" type="text">
</div>
<div>
<button id="replyAddBtn">댓글 쓰기</button>
</div>
</body>
</html>
write
<%@ 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>
<script type="text/javascript" src="/resources/js/jquery-3.5.1.js"></script>
<script type="text/javascript" src="/resources/js/writer.js"></script>
</head>
<body>
<h1>게시판 글쓰기 화면</h1>
<form role="form" action="/board/writePost" method="post" enctype="multipart/form-data">
<table>
<tr><td>제목</td></tr>
<tr><td><input type="text" name="title" placeholder="제목을 작성해주세요"></td></tr>
<tr><td>작성자</td></tr>
<tr><td><input type="text" name="writer" value="작성자"></td></tr>
<tr><td>내용</td></tr>
<tr><td><textarea name="content"></textarea></td></tr>
<tr><td><input type="file" name="uploadFile" multiple></td></tr>
<tr><td><input type="submit" value="전송"></td></tr>
</table>
</form>
<div class="uploadResult">
<ul>
</ul>
</div>
</body>
</html>
update
<%@ 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>
<h1> 수정중 </h1>
<form action="/board/update" method="post">
<table border="1">
<tr><td>번호</td>
<td><input type="hidden" value="${modify.bno}" name="bno">${modify.bno}</td></tr>
<tr><td>제목</td>
<td><input type="text" value="${modify.title}" name="title"></td></tr>
<tr><td>내용</td>
<td><textarea name="content">${modify.content}</textarea></td></tr>
<tr><td colspan="2"><input type="submit" value="수정하기"></td></tr>
</table>
</form>
</body>
</html>
list
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!-- jstl이란?? -->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<h1>게시판</h1><a href="/board/write">글쓰기</a>
<table border="1" style="border-collapse:collapse">
<tr>
<td>번호</td>
<td>제목</td>
<td>작성자</td>
<td>작성일</td>
<td>수정일</td>
</tr>
<!-- for시작 -->
<c:forEach items="${list}" var="board">
<tr>
<td>${board.bno}</td>
<td><a href="detail?bno=${board.bno}">${board.title}</a></td>
<td>${board.writer}</td>
<td>${board.regdate}</td>
<td>${board.updatedate}</td>
</tr>
</c:forEach>
<!-- for끝-->
</table>
<c:if test="${pageMaker.prev}">
<a href="/board/list?pageNum=${pageMaker.startPage-1}&amount=${pageMaker.cri.amount}">이전</a>
</c:if>
<c:forEach var="num" begin="${pageMaker.startPage}" end="${pageMaker.endPage}">
<a href="/board/list?pageNum=${num}&amount=${pageMaker.cri.amount}">${num}</a>
</c:forEach>
<c:if test="${pageMaker.next}">
<a href="/board/list?pageNum=${pageMaker.endPage+1}&amount=${pageMaker.cri.amount}">다음</a>
</c:if><br>
<form action="/board/list" method="get">
<select name="type">
<option value="t">제목</option>
<option value="tc">제목+내용</option>
<option value="c">내용</option>
<option value="w">작성자</option>
</select>
<input type="text" name="keyword">
<input type="submit" value="검색">
</form>
</body>
</html>
'Programming > 게시판 만들기' 카테고리의 다른 글
[게시판 만들기] MAPPER (0) | 2021.02.14 |
---|---|
[게시판 만들기] DTO (0) | 2021.02.14 |
[게시판 만들기] board controller / member controller (0) | 2021.02.14 |
[게시판 만들기] member add / list / detail (0) | 2021.02.14 |
[게시판 만들기] addmember / login / boardwrite / boardmodify / boardlist / boarddetail (0) | 2021.02.14 |