Skip to content

Commit f0d6cfd

Browse files
authored
Merge pull request #20 from comeCU/master
添加了建表语句,在eclipse环境下运行了该项目,附上导出的文件以便同学学习
2 parents 1f1b685 + 25b61bf commit f0d6cfd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1147
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
5+
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
6+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/c3p0-0.9.5.2.jar"/>
7+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-beanutils-1.9.3.jar"/>
8+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-collections-3.2.2.jar"/>
9+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-dbutils-1.6.jar"/>
10+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-logging-1.2.jar"/>
11+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/itcast-tools-1.4.jar"/>
12+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jstl-1.2.jar"/>
13+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/mchange-commons-java-0.2.11.jar"/>
14+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/mysql-connector-java-5.0.8-bin.jar"/>
15+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
16+
<attributes>
17+
<attribute name="owner.project.facets" value="java"/>
18+
</attributes>
19+
</classpathentry>
20+
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0.85"/>
21+
<classpathentry kind="output" path="build/classes"/>
22+
</classpath>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>CustomerManagement</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.wst.common.project.facet.core.builder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.wst.validation.validationbuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
</buildSpec>
24+
<natures>
25+
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
26+
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
27+
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
28+
<nature>org.eclipse.jdt.core.javanature</nature>
29+
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
30+
</natures>
31+
</projectDescription>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry excluding="**/bower_components/*|**/node_modules/*|**/*.min.js" kind="src" path="WebContent"/>
4+
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
5+
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
6+
<attributes>
7+
<attribute name="hide" value="true"/>
8+
</attributes>
9+
</classpathentry>
10+
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
11+
<classpathentry kind="output" path=""/>
12+
</classpath>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
encoding/<project>=UTF-8
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
4+
org.eclipse.jdt.core.compiler.compliance=1.7
5+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7+
org.eclipse.jdt.core.compiler.source=1.7
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
2+
<wb-module deploy-name="CustomerManagement">
3+
<wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/>
4+
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
5+
<property name="context-root" value="CustomerManagement"/>
6+
<property name="java-output-path" value="/CustomerManagement/build/classes"/>
7+
</wb-module>
8+
</project-modules>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<faceted-project>
3+
<fixed facet="jst.web"/>
4+
<fixed facet="java"/>
5+
<fixed facet="wst.jsdt.web"/>
6+
<installed facet="jst.web" version="2.5"/>
7+
<installed facet="wst.jsdt.web" version="1.0"/>
8+
<installed facet="java" version="1.7"/>
9+
</faceted-project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Window
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.wst.ws.service.policy.projectEnabled=false
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Manifest-Version: 1.0
2+
Class-Path:
3+
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
5+
version="3.1">
6+
<servlet>
7+
<servlet-name>CustomerServlet</servlet-name>
8+
<servlet-class>servlet.CustomerServlet</servlet-class>
9+
</servlet>
10+
11+
12+
<servlet-mapping>
13+
<servlet-name>CustomerServlet</servlet-name>
14+
<url-pattern>/CustomerServlet</url-pattern>
15+
</servlet-mapping>
16+
17+
</web-app>
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<%--
2+
Created by IntelliJ IDEA.
3+
User: codingBoy
4+
Date: 16/10/23
5+
Time: 下午12:11
6+
To change this template use File | Settings | File Templates.
7+
--%>
8+
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
9+
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
10+
<html>
11+
<head>
12+
<title>Title</title>
13+
</head>
14+
<body>
15+
<h3 align="center">添加客户</h3>
16+
<form action="<c:url value='/CustomerServlet'/>" method="post">
17+
<input type="hidden" name="method" value="add">
18+
<table border="0" align="center" width="40%" style="margin-left: 100px">
19+
<tr>
20+
<td width="100px">客户名称</td>
21+
<td width="40%">
22+
<input type="text" name="name"/>
23+
</td>
24+
<td align="left">
25+
<label id="nameError" class="error">&nbsp;</label>
26+
</td>
27+
</tr>
28+
<tr>
29+
<td>客户性别</td>
30+
<td>
31+
<input type="radio" name="gender" value="male" id="male"/>
32+
<label for="male">男</label>
33+
<input type="radio" name="gender" value="female" id="female"/>
34+
<label for="female">女</label>
35+
</td>
36+
<td>
37+
<label id="genderError" class="error">&nbsp;</label>
38+
</td>
39+
</tr>
40+
<tr>
41+
<td>手机</td>
42+
<td>
43+
<input type="text" name="phone" id="phone"/>
44+
</td>
45+
<td>
46+
<label id="phoneError" class="error">&nbsp;</label>
47+
</td>
48+
</tr>
49+
<tr>
50+
<td>邮箱</td>
51+
<td>
52+
<input type="text" name="email" id="email"/>
53+
</td>
54+
<td>
55+
<label id="emailError" class="error">&nbsp;</label>
56+
</td>
57+
</tr>
58+
<tr>
59+
<td>描述</td>
60+
<td>
61+
<textarea rows="5" cols="30" name="description"></textarea>
62+
</td>
63+
<td>
64+
<label id="descriptionError" class="error">&nbsp;</label>
65+
</td>
66+
</tr>
67+
<tr>
68+
<td></td>
69+
<td>
70+
<input type="submit" name="submit"/>
71+
<input type="reset" name="reset"/>
72+
</td>
73+
</tr>
74+
</table>
75+
</form>
76+
77+
</body>
78+
</html>
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<%--
2+
Created by IntelliJ IDEA.
3+
User: codingBoy
4+
Date: 16/10/23
5+
Time: 下午2:43
6+
To change this template use File | Settings | File Templates.
7+
--%>
8+
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
9+
<%@ taglib prefix="c" uri ="http://java.sun.com/jsp/jstl/core"%>
10+
<html>
11+
<head>
12+
<title>Title</title>
13+
</head>
14+
<body>
15+
<h3 align="center">编辑客户</h3>
16+
<form action="<c:url value='/CustomerServlet'/>" method="post" >
17+
<input type="hidden" name="method" value="edit"/>
18+
<input type="hidden" name="id" value="${customer.id}"/>
19+
<table border="0" align="center" width="40%" style="margin-left: 100px">
20+
<tr>
21+
<td width="100px">客户名称</td>
22+
<td width="40%">
23+
<input type="text" name="name" value="${customer.name}"/>
24+
</td>
25+
<td align="left">
26+
<label id="nameError" class="error">&nbsp;</label>
27+
</td>
28+
</tr>
29+
<tr>
30+
<td>客户性别</td>
31+
<td>
32+
<input type="radio" name="gender" value="male" id="male" <c:if test="${customer.gender eq 'male'}">checked="checked"</c:if>/>
33+
<label for="male">男</label>
34+
<input type="radio" name="gender" value="female" id="female" <c:if test="${customer.gender eq 'female'}">checked="checked"</c:if> />
35+
<label for="female">女</label>
36+
</td>
37+
<td>
38+
<label id="genderError"class="error">&nbsp;</label>
39+
</td>
40+
</tr>
41+
<tr>
42+
<td>手机</td>
43+
<td>
44+
<input type="text" name="phone" id="phone" value="${customer.phone}"/>
45+
</td>
46+
<td>
47+
<label id="phoneError"class="error">&nbsp;</label>
48+
</td>
49+
</tr>
50+
<tr>
51+
<td>邮箱</td>
52+
<td>
53+
<input type="text" name="email" id="email" value="${customer.email}"/>
54+
</td>
55+
<td>
56+
<label id="emailError"class="error">&nbsp;</label>
57+
</td>
58+
</tr>
59+
<tr>
60+
<td>描述</td>
61+
<td>
62+
<textarea rows="5" cols="30" name="description">${customer.description}</textarea>
63+
</td>
64+
<td>
65+
<label id="discriptionError"class="error">&nbsp;</label>
66+
</td>
67+
</tr>
68+
<tr>
69+
<td></td>
70+
<td>
71+
<input type="submit" name="submit" value="编辑客户"/>
72+
<input type="reset" name="reset"/>
73+
</td>
74+
</tr>
75+
</table>
76+
</form>
77+
78+
79+
</body>
80+
</html>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<%--
2+
Created by IntelliJ IDEA.
3+
User: codingBoy
4+
Date: 16/10/23
5+
Time: 下午12:11
6+
To change this template use File | Settings | File Templates.
7+
--%>
8+
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
9+
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
10+
<html>
11+
<head>
12+
<title>主页</title>
13+
</head>
14+
<frameset rows="20%,*">
15+
<frame src="<c:url value='/top.jsp'/>" name="top"/>
16+
<frame src="<c:url value='/welcome.jsp'/>" name="main"/>
17+
</frameset>
18+
</html>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<%--
2+
Created by IntelliJ IDEA.
3+
User: codingBoy
4+
Date: 16/10/23
5+
Time: 上午11:56
6+
To change this template use File | Settings | File Templates.
7+
--%>
8+
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
9+
<jsp:forward page="/frame.jsp"/>

0 commit comments

Comments
 (0)