-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5151ac4
commit ad74467
Showing
36 changed files
with
711 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>BoothProject</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
</buildSpec> | ||
<natures> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk-13.0.2"> | ||
<attributes> | ||
<attribute name="module" value="true"/> | ||
<attribute name="owner.project.facets" value="java"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v9.0"> | ||
<attributes> | ||
<attribute name="owner.project.facets" value="jst.web"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/> | ||
<classpathentry kind="lib" path="BOOTH/WEB-INF/lib/ojdbc8.jar"> | ||
<attributes> | ||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="lib" path="BOOTH/WEB-INF/lib/tomcat-dbcp.jar"> | ||
<attributes> | ||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="lib" path="BOOTH/WEB-INF/lib/json-20200518.jar"> | ||
<attributes> | ||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/> | ||
<classpathentry kind="output" path="build/classes"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>BOOTH</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.wst.common.project.facet.core.builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.wst.validation.validationbuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature> | ||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> | ||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.eclipse.wst.jsdt.core.jsNature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry excluding="**/bower_components/*|**/node_modules/*|**/*.min.js" kind="src" path="WebContent"/> | ||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/> | ||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject"> | ||
<attributes> | ||
<attribute name="hide" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/> | ||
<classpathentry kind="output" path=""/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=13 | ||
org.eclipse.jdt.core.compiler.compliance=13 | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning | ||
org.eclipse.jdt.core.compiler.release=enabled | ||
org.eclipse.jdt.core.compiler.source=13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0"> | ||
|
||
|
||
|
||
<wb-module deploy-name="BOOTH"> | ||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/> | ||
<wb-resource deploy-path="/" source-path="/BOOTH"/> | ||
|
||
|
||
|
||
<property name="java-output-path" value="/BOOTH/build/classes"/> | ||
|
||
<property name="context-root" value="BOOTH"/> | ||
|
||
|
||
|
||
</wb-module> | ||
|
||
|
||
|
||
</project-modules> |
10 changes: 10 additions & 0 deletions
10
Java/.settings/org.eclipse.wst.common.project.facet.core.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<faceted-project> | ||
<runtime name="Apache Tomcat v9.0"/> | ||
<fixed facet="java"/> | ||
<fixed facet="jst.web"/> | ||
<fixed facet="wst.jsdt.web"/> | ||
<installed facet="java" version="13"/> | ||
<installed facet="jst.web" version="4.0"/> | ||
<installed facet="wst.jsdt.web" version="1.0"/> | ||
</faceted-project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
org.eclipse.wst.jsdt.launching.baseBrowserLibrary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Window |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Manifest-Version: 1.0 | ||
Class-Path: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--><!-- The contents of this file will be loaded for each web application --> | ||
<Context> | ||
|
||
<!-- Default set of monitored resources. If one of these changes, the --> | ||
<!-- web application will be reloaded. --> | ||
<WatchedResource>WEB-INF/web.xml</WatchedResource> | ||
<WatchedResource>WEB-INF/tomcat-web.xml</WatchedResource> | ||
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource> | ||
|
||
<!-- Uncomment this to disable session persistence across Tomcat restarts --> | ||
<!-- | ||
<Manager pathname="" /> | ||
--> | ||
|
||
<Resource name = "jdbc/BOOTH" | ||
auth = "Container" | ||
type = "javax.sql.DataSource" | ||
driverClassName = "oracle.jdbc.driver.OracleDriver" | ||
username = "BOOTH" | ||
password = "1111" | ||
url = "jdbc:oracle:thin:@//61.97.191.33:1521/xe" | ||
maxWait = "5000" | ||
/> | ||
</Context> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" id="WebApp_ID" version="4.0"> | ||
<display-name>BOOTH</display-name> | ||
|
||
<welcome-file-list> | ||
<welcome-file>index.html</welcome-file> | ||
<welcome-file>index.htm</welcome-file> | ||
<welcome-file>index.jsp</welcome-file> | ||
<welcome-file>default.html</welcome-file> | ||
<welcome-file>default.htm</welcome-file> | ||
<welcome-file>default.jsp</welcome-file> | ||
</welcome-file-list> | ||
</web-app> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<%@ 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> | ||
|
||
</body> | ||
</html> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package booth.booth.action; | ||
|
||
import java.io.IOException; | ||
|
||
import javax.servlet.ServletException; | ||
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpServletResponse; | ||
|
||
public interface boothAction { | ||
public void execute(HttpServletRequest request, HttpServletResponse response) | ||
throws ServletException, IOException; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package booth.booth.action; | ||
|
||
import java.io.IOException; | ||
|
||
import javax.servlet.ServletException; | ||
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpServletResponse; | ||
|
||
public class boothCreateAction implements boothAction { | ||
|
||
@Override | ||
public void execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
package booth.booth.model; | ||
|
||
import java.sql.Connection; | ||
import java.sql.PreparedStatement; | ||
import java.sql.ResultSet; | ||
import java.sql.SQLException; | ||
import java.util.ArrayList; | ||
|
||
import javax.naming.Context; | ||
import javax.naming.InitialContext; | ||
import javax.sql.DataSource; | ||
|
||
|
||
public class boothDAO { | ||
private DataSource ds; | ||
private Connection con; | ||
private PreparedStatement pstmt; | ||
private ResultSet rs; | ||
|
||
public boothDAO() { | ||
try { | ||
Context initContext = new InitialContext(); | ||
Context envContext = (Context)initContext.lookup("java:/comp/env"); | ||
ds = (DataSource)envContext.lookup("jdbc/BOOTH"); | ||
} | ||
catch(Exception e) | ||
{ | ||
e.printStackTrace(); | ||
} | ||
} | ||
public void close() { | ||
try { | ||
if(con != null) { | ||
con.close(); | ||
con = null; | ||
} | ||
}catch(SQLException e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
public boolean createBooth() { | ||
String sql = "insert into BOOTH_MEMBER(USER_ID, USER_PW, USER_NICK, USER_PHONENUM, USER_EMAIL) values(?,?,?,?,?)"; | ||
boolean check = false; | ||
try { | ||
con = ds.getConnection(); | ||
pstmt = con.prepareStatement(sql); | ||
pstmt.setString(1, dto.getUserId()); | ||
pstmt.setString(2, dto.getUserPw()); | ||
pstmt.setString(3, dto.getUserNick()); | ||
pstmt.setString(4, dto.getUserPhoneNum()); | ||
pstmt.setString(5, dto.getUserEmail()); | ||
int x = pstmt.executeUpdate(); | ||
|
||
if (x < 1) { | ||
System.out.println("정상적으로 저장되지 않았습니다."); | ||
} else { | ||
check = true; | ||
} | ||
pstmt.close(); | ||
}catch(SQLException ex) { | ||
System.out.println("SQL insert 오류 : " + ex.getLocalizedMessage()); | ||
check = false; | ||
} | ||
return check; | ||
} | ||
public MemberDTO view(String id) { | ||
String sql = "select pwd, name, email, joinDate from member where id=?"; | ||
MemberDTO dto = new MemberDTO(); | ||
try { | ||
con = ds.getConnection(); | ||
pstmt = con.prepareStatement(sql); | ||
pstmt.setString(1, id); | ||
rs = pstmt.executeQuery(); | ||
|
||
if (rs.next()) { | ||
dto.setUserId(id); | ||
dto.setUserPw(rs.getString("USER_PW")); | ||
dto.setUserNick(rs.getString("USER_NICK")); | ||
dto.setUserEmail(rs.getString("USER_EMAIL")); | ||
dto.setUserPhoneNum(rs.getString("USER_PHONENUM")); | ||
} | ||
rs.close(); | ||
pstmt.close(); | ||
}catch(SQLException e) { | ||
e.printStackTrace(); | ||
} finally { | ||
close(); | ||
} | ||
return dto; | ||
} | ||
} |
Oops, something went wrong.