본문 바로가기

jsp 프로젝트 V2 post

JSP게시판 만들기 4강 - 화면구현

1. 모든 페이지 목록

 

(1) index.jsp

(2) post

- detail.jsp

- saveForm.jsp

- updateForm.jsp

(3) member

- joinForm.jsp

- loginForm.jsp

- updateForm.jsp

2. index.jsp (샘플)

 

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>게시글 목록 페이지</title>
<link href="/apple/static/css/style.css" rel="stylesheet"> 
</head>
<body>
	<header>
		<h1>게시글 목록 페이지</h1>		
	</header>
	<hr />
	<nav>
		<a href="/apple/member?cmd=loginForm">로그인</a>
		<a href="/apple/member?cmd=joinForm">회원가입</a>
	</nav>
	<section>
		<table border="1">
			<tr>
				<th>번호</th>
				<th>제목</th>
				<th>날짜</th>
			</tr>
			<tr>
				<td>1</td>
				<td><a href="/apple/post?cmd=detial&id=1">첫번째글입니다.</a></td>
				<td>2020-06-18</td>
			</tr>
		</table>
		<a href="/apple/post?cmd=saveForm">글쓰기</a>
	</section>
	<footer>
		<p>Created By Apple.</p>
		<p>부산 진구 중앙대로 708</p>
	</footer>
</body>
</html>

 

3. style.css

header {
	display: grid;
	justify-content : center;
	background-color : #e1ddbd;
}

nav{
	display: grid;
	grid-template-columns: auto auto;
	grid-gap: 10px;
	justify-content : center;
}

section {
	display: grid;
	justify-content:center;
	margin:20px;
}

footer {
	display: grid;
	justify-content:center;
	background-color:#e1ddbd;
}