Skip to content

Commit ccd3246

Browse files
committed
거의 최종
1 parent 9cae769 commit ccd3246

File tree

12 files changed

+113
-127
lines changed

12 files changed

+113
-127
lines changed

Servers/Tomcat v9.0 Server at localhost-config/server.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
APR (HTTP/AJP) Connector: /docs/apr.html
6161
Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
6262
-->
63-
<Connector connectionTimeout="20000" port="8888" protocol="HTTP/1.1" redirectPort="8443"/>
63+
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
6464
<!-- A "Connector" using the shared thread pool-->
6565
<!--
6666
<Connector executor="tomcatThreadPool"

safproject/WebContent/board/new-list.jsp

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
</div>-->
3232
<div class="col-4">
3333
<!-- GA 클래스 추가 -->
34-
<a href="${pageContext.request.contextPath}/board/new-write.jsp"
34+
<a href="${pageContext.request.contextPath}/board/controller/BoardWrite.bo"
3535
class="btn btn-md btn-block btn-primary g-color-white g-mr-10 g-mb-15 g-brd-0 adopt_application_event">
3636
글쓰기
3737
</a>

safproject/WebContent/header/header.jsp

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
<a href="${pageContext.request.contextPath}/faq/faq.jsp"style="text-decoration:none; ">전문가FAQ</a>
6767
</li>
6868
<li class="list-inline-header">
69-
<a href="${pageContext.request.contextPath}/board/new-list.jsp"style="text-decoration:none; ">커뮤니티</a>
69+
<a href="${pageContext.request.contextPath}/board/controller/BoardListOk.bo"style="text-decoration:none; ">커뮤니티</a>
7070
<%-- <ul class="showmenu list-drop">
7171
<li class="hide-list"><a class="drop-a"href="${pageContext.request.contextPath}/board/new-list.jsp">소통해요</a></li>
7272
<li class="hide-list"><a class="drop-a"href="${pageContext.request.contextPath}/board/new-list.jsp">내 반려동물 자랑</a></li>

safproject/WebContent/index.jsp

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<%@ page language="java" contentType="text/html; charset=UTF-8"
2+
pageEncoding="UTF-8"%>
3+
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
4+
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
5+
<!DOCTYPE html>
6+
<html>
7+
<head>
8+
<meta charset="UTF-8">
9+
<title>Insert title here</title>
10+
</head>
11+
<body>
12+
</body>
13+
<script>
14+
var context = '<c:out value="${pageContext.request.contextPath}"/>';
15+
location.href =context+"/main/controller/MainLostPetCount.ma" ;
16+
</script>
17+
</html>

safproject/WebContent/login/login.jsp

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
</div>
3939
<div class="write-login-form">
4040
<label class="login-pw g-brd-main--hover">비밀번호:</label>
41-
<input class="form-control" name="pw" type="text">
41+
<input class="form-control" name="pw" type="password">
4242
<div class="row status-box">
4343

4444
<div class="col align-self-center">

safproject/WebContent/lostpet/LostPet_detail.jsp

+36-36
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434
<div class="join_container_fluid nm_h_underline smbc" id="join_nm_h_underline">
3535
</div>
3636
</div>
37-
<c:set var="lostpet" value="${lostpet}"/>
38-
<c:set var="files" value="${files}"/>
37+
<c:set var="lostpet" value="${lostpet}"/>
38+
<c:set var="files" value="${files}"/>
3939
<div class="bg-light space-1">
4040
<div class="container g-mt-30 py-1 ">
4141
<div class="shadow-sm p-0">
42-
<h2 id="breadcrumb-title" class="h2 g-font-size-28 font-weight-bold g-line-height-1">실종동물
42+
<h2 id="breadcrumb-title" class="h2 g-font-size-28 font-weight-bold g-line-height-1">실종동물 ${lostpet.getLparea2()}
4343
<span style="color: #019267 !important;">
4444
<script>
4545
if ( '<c:out value="${lostpet.getLpstatus()}"/>' == '1' ) {
@@ -161,17 +161,17 @@
161161
<div class="content te p-0">
162162
<!-- 첨부파일 목록 -->
163163
<c:choose>
164-
<c:when test="${files != null and fn:length(files) > 0}">
165-
<c:forEach var="file" items="${files}">
166-
<img class="img" src="${pageContext.request.contextPath}/lostpet/animal_image/${file.getFileName()}"
164+
<c:when test="${files != null and fn:length(files) > 0}">
165+
<c:forEach var="file" items="${files}">
166+
<img class="img" src="${pageContext.request.contextPath}/lostpet/images/${file.getFileName()}"
167167
style="height: 350px; width: 350px;">
168-
169-
</a>
170-
<br>
171-
</c:forEach>
172-
</c:when>
173-
<c:otherwise>
174-
</c:otherwise>
168+
169+
</a>
170+
<br>
171+
</c:forEach>
172+
</c:when>
173+
<c:otherwise>
174+
</c:otherwise>
175175
</c:choose>
176176
<hr />
177177
${lostpet.getLpcontent()}
@@ -227,14 +227,14 @@
227227

228228
</body>
229229
<script type="text/javascript" src="//dapi.kakao.com/v2/maps/sdk.js?appkey=6cf3e9ffc133b6ee746032c7a1b992c7&libraries=services"></script>
230-
<script type="text/javascript" src="//dapi.kakao.com/v2/maps/sdk.js?appkey=6cf3e9ffc133b6ee746032c7a1b992c7"></script>
230+
<script type="text/javascript" src="//dapi.kakao.com/v2/maps/sdk.js?appkey=6cf3e9ffc133b6ee746032c7a1b992c7"></script>
231231
<script>
232232
console.log('<c:out value="${lostpet.getLparea1()}"/>');
233233
var mapContainer = document.getElementById('img'), // 지도를 표시할 div
234234
mapOption = {
235-
center : new kakao.maps.LatLng(33.450701, 126.570667), // 지도의 중심좌표
236-
draggable : false,
237-
level : 3
235+
center : new kakao.maps.LatLng(33.450701, 126.570667), // 지도의 중심좌표
236+
draggable : false,
237+
level : 3
238238
// 지도의 확대 레벨
239239
};
240240
@@ -247,18 +247,18 @@ geocoder.addressSearch('<c:out value="${lostpet.getLparea1()}"/>', function(resu
247247
if (status === kakao.maps.services.Status.OK) {
248248
var coords = new kakao.maps.LatLng(result[0].y, result[0].x);
249249
var circle = new kakao.maps.Circle({
250-
center : coords, // 원의 중심좌표 입니다
251-
radius : 100, // 미터 단위의 원의 반지름입니다
252-
strokeWeight : 5, // 선의 두께입니다
253-
strokeColor : '#75B8FA', // 선의 색깔입니다
254-
strokeOpacity : 1, // 선의 불투명도 입니다 1에서 0 사이의 값이며 0에 가까울수록 투명합니다
255-
strokeStyle : 'dashed', // 선의 스타일 입니다
256-
fillColor : '#CFE7FF', // 채우기 색깔입니다
257-
fillOpacity : 0.7
258-
// 채우기 불투명도 입니다
259-
});
260-
261-
circle.setMap(map);
250+
center : coords, // 원의 중심좌표 입니다
251+
radius : 100, // 미터 단위의 원의 반지름입니다
252+
strokeWeight : 5, // 선의 두께입니다
253+
strokeColor : '#75B8FA', // 선의 색깔입니다
254+
strokeOpacity : 1, // 선의 불투명도 입니다 1에서 0 사이의 값이며 0에 가까울수록 투명합니다
255+
strokeStyle : 'dashed', // 선의 스타일 입니다
256+
fillColor : '#CFE7FF', // 채우기 색깔입니다
257+
fillOpacity : 0.7
258+
// 채우기 불투명도 입니다
259+
});
260+
261+
circle.setMap(map);
262262
// 지도의 중심을 결과값으로 받은 위치로 이동시킵니다
263263
map.setCenter(coords);
264264
}
@@ -280,13 +280,13 @@ const open = () => {
280280
document.querySelector(".bg").addEventListener("click", close);
281281
282282
283-
function send(){
284-
if(!findReplyWriteForm.reply.value){
285-
alert("댓글을 입력해주세요.");
286-
return false;
287-
}
288-
else return true;
289-
}
283+
function send(){
284+
if(!findReplyWriteForm.reply.value){
285+
alert("댓글을 입력해주세요.");
286+
return false;
287+
}
288+
else return true;
289+
}
290290
</script>
291291

292292
</html>

safproject/WebContent/mypage/Userupdate.jsp

+1-33
Original file line numberDiff line numberDiff line change
@@ -53,39 +53,7 @@
5353
<div class="modi-row">
5454
<div class="modi-col">
5555
<div>
56-
<table class="modi-table1">
57-
<tbody>
58-
<tr class="modi-table-tr">
59-
<th class="modi-table-th">
60-
<span class="col1-sp">
61-
아이디
62-
</span>
63-
</th>
64-
<td class="modi-table-td">
65-
<div class="modi-item">
66-
<input type="text" name="uid" id="modi-id" placeholder="공백없이 4자 이상" class="form-control">
67-
<div class="div_info_maroon">
68-
<span class="setSubTextColor"></span>
69-
</div>
70-
</div>
71-
</td>
72-
</tr>
73-
74-
<tr class="modi-table-tr">
75-
<th class="modi-table-th">
76-
<span class="col1-sp">이름(닉네임)</span>
77-
</th>
78-
<td class="modi-table-td">
79-
<div class="modi-item">
80-
<input type="text" name="uname" id="modi-name" maxlength="25" class="form-control" value="${user.getUname()}">
81-
<div class="div_info_maroon">
82-
<span class="setSubTextColor"></span>
83-
</div>
84-
</div>
85-
</td>
86-
</tr>
87-
</tbody>
88-
</table>
56+
8957
<table class="modi-table1">
9058
<tbody>
9159

safproject/WebContent/mypage/Userupdatepw.jsp

+1-2
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
<span>
9999
<ul>
100100
<li>
101-
영문대문자, 영문소문자, 숫자, 특수기호 중 3가지를 포함한 8자리 이상의 암호나, 2가지를 포함한 10자리 이상의 암호를 사용할 수 있습니다.
101+
영문대문자 소문자를 사용하여 8 ~ 20자로 정해주셔야 합니다.
102102
</li>
103103
<li>
104104
쉬운 비밀번호나 자주 쓰는 사이트의 비밀번호가 같을 경우, 도용되기 쉬우므로 주기적으로 변경하셔서 사용하는 것이 좋습니다.
@@ -110,7 +110,6 @@
110110
</ul>
111111
<br>
112112
<br>
113-
&nbsp;&nbsp;문의가 있으실 경우 회원,모금팀 info@ekara.org, 02-6283-0999로 연락 부탁드립니다.
114113
</span>
115114
</div>
116115

safproject/src/com/saf/app/board/controller/BoardFrontController.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,8 @@ protected void doProcess(HttpServletRequest req, HttpServletResponse resp) throw
4444
}else if(command.equals("/board/controller/BoardWrite.bo")) {
4545
af = new BoardWrite().execute(req, resp);
4646
}else if(command.equals("/board/controller/BoardWriteOk.bo")) {
47-
af = new BoardWriteOk().execute(req, resp);
48-
49-
47+
System.out.print("왔니");
48+
af = new BoardWriteOk().execute(req, resp);
5049
}else if(command.equals("/board/controller/BoardListOk.bo")) {
5150
try {
5251
af = new BoardListOk().execute(req,resp);

safproject/src/com/saf/app/board/controller/BoardWrite.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,18 @@ public ActionForward execute(HttpServletRequest req, HttpServletResponse resp) t
1717
UserDAO uDao = new UserDAO();
1818
ActionForward af = new ActionForward();
1919

20-
20+
2121
System.out.print(session.getAttribute("unum"));
2222

2323
String buid = uDao.getUserInfo((Integer)session.getAttribute("unum")).getUid();
2424

2525
System.out.print(buid);
26+
2627

2728
req.setAttribute("buid", buid);
2829

2930
af.setRedirect(false);
30-
af.setPath("/app/board/controller/BoardWriteOk.bo");
31+
af.setPath("/board/new-write.jsp");
3132

3233
return af;
3334
}

safproject/src/com/saf/app/board/controller/BoardWriteOk.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ public ActionForward execute(HttpServletRequest req, HttpServletResponse resp) t
2626

2727
//요청객체, 업로드폴더 경로, 파일의 크기, 인코딩 방식, 이름변경정책
2828
//MultipartRequest multi = new MultipartRequest(req, uploadFolder, fileSize, "UTF-8", new DefaultFileRenamePolicy());
29-
System.out.print("1");
3029

3130
board.setBtitle(req.getParameter("btitle"));
3231
board.setBurl(req.getParameter("burl"));
3332
board.setBcontent(req.getParameter("bcontent"));
3433
board.setBuid(req.getParameter("buid"));
34+
3535

3636
/*System.out.println(board.getBtitle());
3737
System.out.println(board.getBurl());

safproject/src/com/saf/app/lostpet/controller/LostPetWriteOk.java

+48-46
Original file line numberDiff line numberDiff line change
@@ -14,50 +14,52 @@
1414
import com.saf.app.lostpet.vo.LostPetVO;
1515

1616
public class LostPetWriteOk implements Action {
17-
@Override
18-
public ActionForward execute(HttpServletRequest req, HttpServletResponse resp) throws IOException {
19-
20-
21-
22-
String uploadFolder = "C:\\aigb_0900_ksy\\1team_image"; //request.getSession().getServletContext().getRealPath("");
23-
int fileSize = 1024 * 1024 * 5;//5M
24-
25-
//요청객체, 업로드폴더 경로, 파일의 크기, 인코딩 방식, 이름변경정책
26-
MultipartRequest multi = new MultipartRequest(req, uploadFolder, fileSize, "UTF-8", new DefaultFileRenamePolicy());
27-
28-
29-
System.out.println(multi.getParameter("lpstatus"));
30-
System.out.println(multi.getParameter("lpgender"));
31-
System.out.println(multi.getParameter("lpcontent"));
32-
LostPetDAO lpDao = new LostPetDAO();
33-
34-
35-
36-
FilesDAO fDao = new FilesDAO();
37-
LostPetVO lostpet = new LostPetVO();
38-
ActionForward af = new ActionForward();
39-
lostpet.setLpstatus(Integer.parseInt(multi.getParameter("lpstatus")));
40-
lostpet.setLparea1(multi.getParameter("lparea1"));
41-
lostpet.setLparea2(multi.getParameter("lparea2"));
42-
lostpet.setLparea3(multi.getParameter("lparea3"));
43-
lostpet.setLpspecies(multi.getParameter("lpspecies"));
44-
lostpet.setLpbreed(multi.getParameter("lpbreed"));
45-
lostpet.setLpgender(multi.getParameter("lpgender"));
46-
lostpet.setLpage(multi.getParameter("lpage"));
47-
lostpet.setLpcolor(multi.getParameter("lpcolor"));
48-
lostpet.setLptime(multi.getParameter("lptime"));
49-
lostpet.setLpcontent(multi.getParameter("lpcontent"));
50-
lostpet.setUnum(1);
51-
52-
//게시글 추가
53-
lpDao.insert(lostpet);
54-
//파일 추가
55-
fDao.insert(multi, lpDao.getSeq());
56-
57-
af.setRedirect(true);
58-
af.setPath(req.getContextPath() + "/lostpet/controller/LostPetListOk.lo");
59-
60-
return af;
61-
}
17+
@Override
18+
public ActionForward execute(HttpServletRequest req, HttpServletResponse resp) throws IOException {
19+
20+
21+
22+
// String uploadFolder = "C:\\aigb_0900_ksy\\1team_image"; //request.getSession().getServletContext().getRealPath("");
23+
String rootPath = req.getSession().getServletContext().getRealPath("/");
24+
String uploadFolder = rootPath + "lostpet\\images\\";
25+
int fileSize = 1024 * 1024 * 5;//5M
26+
27+
//요청객체, 업로드폴더 경로, 파일의 크기, 인코딩 방식, 이름변경정책
28+
MultipartRequest multi = new MultipartRequest(req, uploadFolder, fileSize, "UTF-8", new DefaultFileRenamePolicy());
29+
30+
31+
System.out.println(multi.getParameter("lpstatus"));
32+
System.out.println(multi.getParameter("lpgender"));
33+
System.out.println(multi.getParameter("lpcontent"));
34+
LostPetDAO lpDao = new LostPetDAO();
35+
36+
37+
38+
FilesDAO fDao = new FilesDAO();
39+
LostPetVO lostpet = new LostPetVO();
40+
ActionForward af = new ActionForward();
41+
lostpet.setLpstatus(Integer.parseInt(multi.getParameter("lpstatus")));
42+
lostpet.setLparea1(multi.getParameter("lparea1"));
43+
lostpet.setLparea2(multi.getParameter("lparea2"));
44+
lostpet.setLparea3(multi.getParameter("lparea3"));
45+
lostpet.setLpspecies(multi.getParameter("lpspecies"));
46+
lostpet.setLpbreed(multi.getParameter("lpbreed"));
47+
lostpet.setLpgender(multi.getParameter("lpgender"));
48+
lostpet.setLpage(multi.getParameter("lpage"));
49+
lostpet.setLpcolor(multi.getParameter("lpcolor"));
50+
lostpet.setLptime(multi.getParameter("lptime"));
51+
lostpet.setLpcontent(multi.getParameter("lpcontent"));
52+
lostpet.setUnum(1);
53+
54+
//게시글 추가
55+
lpDao.insert(lostpet);
56+
//파일 추가
57+
fDao.insert(multi, lpDao.getSeq());
58+
59+
af.setRedirect(true);
60+
af.setPath(req.getContextPath() + "/lostpet/controller/LostPetListOk.lo");
61+
62+
return af;
63+
}
6264

63-
}
65+
}

0 commit comments

Comments
 (0)