반응형
1. home
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<title>Home</title>
</head>
<body>
<h1>
Hello world!
</h1>
${success }<br>
${session }
<P> The time on the server is ${serverTime}. </P>
<c:choose>
<c:when test="${session == null}">
<a href="toLogin">login</a>
<a href="toRegister">register</a>
</c:when>
<c:otherwise>
<a href="logout">Logout</a>
<a href="toRegister">register</a>
</c:otherwise>
</c:choose>
<a href="boardList">게시판</a>
<form action="search">
<span>검색 : </span><input type="text" name="search">
<select name="type">
<option value="btitle" selected="selected">title</option>
<option value="bContent" >content</option>
</select>
<input type="submit" value="검색">
</form>
</body>
</html>
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
|
2. member
a. login
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<%@ 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>
${fail }
<form action="loginCheck" method="post">
<div class="container">
<label for="username"><b>Username</b></label>
<input type="text" placeholder="Enter Username" name="username" required><br>
<label for="password"><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="password" required><br>
<button type="submit">Login</button>
<input type="checkbox" name="remember">Remember me
</div>
<div class="container">
<button type="button" class="cancelbtn">Cancel</button>
<span class="psw"><a href="findPassword">Forgot password?</a></span>
</div>
</form>
</body>
</html>
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
|
b. register
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
<%@ 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>
<form action="register" method="post">
<div class="container">
<label name="username"><b>Username</b></label>
<input type="text" name="username"><br>
<label name="password"><b>Password</b></label>
<input type="password" name="password"><br>
<label name="passwordCheck"><b>Password check</b></label>
<input type="password" name="passwordCheck"><br>
<label name="gender"><b>Select gender</b></label>
<input type="radio" name="gender" value="m">M
<input type="radio" name="gender" value="f">F<br>
<label name="email"><b>Email</b></label>
<input type="text" name="email"><br>
<label name="birthday"><b>Birthday</b></label>
<input type="date" name="birthday"><br>
<input type="submit" value="JOIN">
</div>
<div class="container">
<a href="findPassword">Forgot Password?</a>
</div>
</form>
</body>
</html>
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
|
c. edit
d. findpassword
3. board
a. boardList
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
//이전 버튼 이벤트
function fn_prev(page, range, rangeSize) {
var page = ((range - 2) * rangeSize) + 1;
var range = range - 1;
var url = "boardList";
url = url + "?page=" + page;
url = url + "&range=" + range;
location.href = url;
}
//페이지 번호 클릭
function fn_pagination(page, range, rangeSize, searchType, keyword) {
var url = "boardList";
url = url + "?page=" + page;
url = url + "&range=" + range;
location.href = url;
}
//다음 버튼 이벤트
function fn_next(page, range, rangeSize) {
var page = parseInt((range * rangeSize)) + 1;
var range = parseInt(range) + 1;
var url = "boardList";
url = url + "?page=" + page;
url = url + "&range=" + range;
location.href = url;
}
</script>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<table border="1">
<tr>
<th>No.</th>
<th>Title</th>
<th>Writer</th>
<th>Date</th>
<th>Hit</th>
</tr>
<c:forEach var="board" items="${board}">
<tr>
<td>${board.boardId }</td>
<td><a href="boardView?boardId=${board.boardId }">
<td>${board.BUsername }</td>
</tr>
</c:forEach>
</table>
<c:if test="${session != null }">
<a href="boardWrite">글 쓰기</a>
</c:if>
<div id="paginationBox">
<ul class="pagination">
<li class="page-item"><a class="page-link" href="#" onClick="fn_prev('${pagination.page}', '${pagination.range}', '${pagination.rangeSize}')">Previous</a></li>
</c:if>
<c:forEach begin="${pagination.startPage}" end="${pagination.endPage}" var="idx">
<li class="page-item <c:out value="${pagination.page == idx ? 'active' : ''}"/> "><a class="page-link" href="#" onClick="fn_pagination('${idx}', '${pagination.range}', '${pagination.rangeSize}')"> ${idx} </a></li>
</c:forEach>
<li class="page-item"><a class="page-link" href="#" onClick="fn_next('${pagination.range}', '${pagination.range}', '${pagination.rangeSize}')" >Next</a></li>
</c:if>
</ul>
</div>
</body>
</html>
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
|
b. boardVieww
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
<%@ 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>
<c:if test="${board.BUsername == session.username}">
<form action="toBoardEdit" method="post">
<input type="hidden" value="${board.boardId }" name="boardId">
<input type="submit" value="edit">
</form>
<form action="boardDelete" method="post">
<input type="hidden" value="${board.boardId }" name="boardId">
<input type="submit" value="delete">
</form>
</c:if>
<c:if test="${session != null }">
<form action="toBoardReply" method="post">
<input type="hidden" value="${board.BIndent }" name="BIndent">
<input type="submit" value="reply to post">
</form>
</c:if>
<table border="1">
<tr>
<td>이름</td>
<td>${board.BUsername}</td>
</tr>
<tr>
<td>Title</td>
</tr>
<tr>
<td>조회수</td>
</tr>
<tr>
<td>Time</td>
</tr>
<tr>
<td>Content</td>
<td>${board.BContent }</td>
</tr>
</table>
<table border="1">
<c:forEach var="comment" items="${comment }">
<tr>
<td><span>${comment.username }</span></td>
<td><span>${comment.content }</span></td>
<td>
<c:if test="${comment.username == session.username }">
<form action="deleteComment" method="post">
<input type="hidden" name="boardId" value="${comment.boardId }">
<input type="hidden" name="commentId" value="${comment.commentId }">
<input type="submit" value="delete comment">
</form>
</c:if>
</td>
</tr>
</c:forEach>
</table>
<form action="postComment" method="post">
<input type="hidden" name="boardId" value="${board.boardId }">
<input type="hidden" name="username" value="${session.username }">
<textarea rows="5" cols="100" name="content"></textarea><br>
<c:if test="${session.username != null }">
<input type="submit" value="comment submit">
</c:if>
</form>
</body>
</html>
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
|
c. boardWrite
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
<%@ 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>
<form action="boardInsert" method="post">
<input type="hidden" name="bUsername" value="${session.username }">
<table border="1">
<tr>
<td>이름</td>
<td>${session.username }</td>
</tr>
<tr>
<td>Title</td>
<td><input type="text" name="bTitle"></td>
</tr>
<tr>
<td>Content</td>
<td><textarea name="bContent" rows="30" cols="100"></textarea></td>
</tr>
<tr>
<td colspan="2">
<input type="submit" value="submit">
</td>
</tr>
</table>
</form>
</body>
</html>
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
|
d. boardEdit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
<%@ 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>
<form action="boardEdit" method="post">
<input type="hidden" name="boardId" value="${board.boardId}">
<table border="1">
<tr>
<td>이름</td>
<td>${board.BUsername }</td>
</tr>
<tr>
<td>Title</td>
</tr>
<tr>
<td>Content</td>
<td><textarea name="bContent" rows="30" cols="100">${board.BContent }</textarea></td>
</tr>
<tr>
<td colspan="2">
<input type="submit" value="submit">
</td>
</tr>
</table>
</form>
</body>
</html>
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
|
e. boardReply
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<%@ 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>
<form action="boardReply" method="post">
<input type="hidden" value="${board.BIndent }" name="BIndent">
<input type="hidden" name="bUsername" value="${session.username }">
<table border="1">
<tr>
<td>이름</td>
<td>${session.username }</td>
</tr>
<tr>
<td>Title</td>
<td><input type="text" name="bTitle"></td>
</tr>
<tr>
<td>Content</td>
<td><textarea name="bContent" rows="30" cols="100"></textarea></td>
</tr>
<tr>
<td colspan="2">
<input type="submit" value="submit">
</td>
</tr>
</table>
</form>
</body>
</html>
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
|
4. search
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<%@ 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>
${result }
<table border="1">
<tr>
<th>No.</th>
<th>Title</th>
<th>Writer</th>
<th>Date</th>
<th>Hit</th>
</tr>
<c:forEach var="board" items="${result}">
<tr>
<td>${board.boardId }</td>
<td><a href="boardView?boardId=${board.boardId }">
<td>${board.BUsername }</td>
</tr>
</c:forEach>
</table>
</body>
</html>
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
|
반응형
'IT > ETC' 카테고리의 다른 글
자바 메모리 구조 (0) | 2019.11.23 |
---|---|
various query (0) | 2019.11.14 |
Settings (0) | 2019.11.14 |
Controller (1) | 2019.11.14 |
Service interface + ServiceImpl class (0) | 2019.11.14 |