<%@page import="board.dto.BoardDTO"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <% request.setCharacterEncoding("utf-8"); String id = (String) session.getAttribute("memberId"); String name = (String) session.getAttribute("memberName"); String subject = request.getParameter("subject"); String content = request.getParameter("content"); BoardDTO dto = new BoardDTO(); dto.setName(name); dto.setId(id); dto.setSubject(subject); dto.setContent(content); BoardDAO dao = new BoardDAO(); int su = dao.write(dto); %> boardWrite.jsp

글쓰기 확인

<%if(su > 0) {%> 글쓰기 성공... <%} else { %> 글쓰기 실패... <%} %>

"> <%@page import="board.dto.BoardDTO"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <% request.setCharacterEncoding("utf-8"); String id = (String) session.getAttribute("memberId"); String name = (String) session.getAttribute("memberName"); String subject = request.getParameter("subject"); String content = request.getParameter("content"); BoardDTO dto = new BoardDTO(); dto.setName(name); dto.setId(id); dto.setSubject(subject); dto.setContent(content); BoardDAO dao = new BoardDAO(); int su = dao.write(dto); %> boardWrite.jsp

글쓰기 확인

<%if(su > 0) {%> 글쓰기 성공... <%} else { %> 글쓰기 실패... <%} %>

"> <%@page import="board.dto.BoardDTO"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <% request.setCharacterEncoding("utf-8"); String id = (String) session.getAttribute("memberId"); String name = (String) session.getAttribute("memberName"); String subject = request.getParameter("subject"); String content = request.getParameter("content"); BoardDTO dto = new BoardDTO(); dto.setName(name); dto.setId(id); dto.setSubject(subject); dto.setContent(content); BoardDAO dao = new BoardDAO(); int su = dao.write(dto); %> boardWrite.jsp

글쓰기 확인

<%if(su > 0) {%> 글쓰기 성공... <%} else { %> 글쓰기 실패... <%} %>

">
<%@page import="board.dao.BoardDAO"%>
<%@page import="board.dto.BoardDTO"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
request.setCharacterEncoding("utf-8");
String id = (String) session.getAttribute("memberId");
String name = (String) session.getAttribute("memberName");
String subject = request.getParameter("subject");
String content = request.getParameter("content");

BoardDTO dto = new BoardDTO();
dto.setName(name);
dto.setId(id);
dto.setSubject(subject);
dto.setContent(content);

BoardDAO dao = new BoardDAO();
int su = dao.write(dto);

%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>boardWrite.jsp</title>
</head>
<body>
	<h1>글쓰기 확인</h1>
	<p>
		<%if(su > 0) {%>
			글쓰기 성공...
		<%} else { %>
			글쓰기 실패...
		<%} %>
	</p>
	<input type="button" value="main" onclick="location.href='../index.jsp'"/>
</body>
</html>