<%@page import="board.dto.BoardDTO"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <% int seq = Integer.parseInt(request.getParameter("seq")); int pg = Integer.parseInt(request.getParameter("pg")); BoardDAO dao = new BoardDAO(); dao.updatehit(seq); BoardDTO dto = dao.boardView(seq); %> boardView.jsp

글보기페이지


"> <%@page import="board.dto.BoardDTO"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <% int seq = Integer.parseInt(request.getParameter("seq")); int pg = Integer.parseInt(request.getParameter("pg")); BoardDAO dao = new BoardDAO(); dao.updatehit(seq); BoardDTO dto = dao.boardView(seq); %> boardView.jsp

글보기페이지


<%=dto.getSubject() %>
글번호 : <%=dto.getSeq() %> 작성자 : <%=dto.getName() %> 조회수 : <%=dto.getHit() %>
<%=dto.getContent() %>
"> <%@page import="board.dto.BoardDTO"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <% int seq = Integer.parseInt(request.getParameter("seq")); int pg = Integer.parseInt(request.getParameter("pg")); BoardDAO dao = new BoardDAO(); dao.updatehit(seq); BoardDTO dto = dao.boardView(seq); %> boardView.jsp

글보기페이지


<%=dto.getSubject() %>
글번호 : <%=dto.getSeq() %> 작성자 : <%=dto.getName() %> 조회수 : <%=dto.getHit() %>
<%=dto.getContent() %>
">
<%@page import="board.dao.BoardDAO"%>
<%@page import="board.dto.BoardDTO"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
int seq = Integer.parseInt(request.getParameter("seq"));
int pg = Integer.parseInt(request.getParameter("pg"));
 
BoardDAO dao = new BoardDAO();
dao.updatehit(seq);
BoardDTO dto = dao.boardView(seq);
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>boardView.jsp</title>
<style type="text/css">
table, th, td {
	border: 1px solid black;
	border-collapse: collapse;
}
td {
	text-align: center;
}
</style>
</head>
<body>
	<h1>글보기페이지</h1>
	<br>
	<table>
		<tr>
			<td colspan="3"><%=dto.getSubject() %></td> <!-- 제목 -->
		</tr>
		<tr>
			<td width="200px">글번호 : <%=dto.getSeq() %></td>
			<td width="200px">작성자 : <%=dto.getName() %></td>
			<td width="200px">조회수 : <%=dto.getHit() %></td>
		</tr>
		<tr>
			<td colspan="3" height="300px" valign="top">
				<pre><%=dto.getContent() %></pre> <!-- 내용 -->
			</td>
		</tr>
	</table>
	<br><br>
	<button onclick="location.href='boardList.jsp?pg=<%=pg%>'">글 목록</button> &nbsp;
	<%if(session.getAttribute("memberId").equals(dto.getId())) { %>
	<button onclick="location.href='boardModifyForm.jsp?pg=<%=pg %>&seq=<%=seq%>'">글 수정</button>
	<button onclick="location.href='boarddelete.jsp?seq=<%=seq%>'">글 삭제</button> &nbsp; 
	<%} %>
</body>
</html>
<%=dto.getSubject() %>
글번호 : <%=dto.getSeq() %> 작성자 : <%=dto.getName() %> 조회수 : <%=dto.getHit() %>
<%=dto.getContent() %>