xerga 1 yıl önce
ebeveyn
işleme
37a202f6c3
100 değiştirilmiş dosya ile 6264 ekleme ve 44 silme
  1. 14 0
      JavaWeb03/.idea/artifacts/servlet02_war.xml
  2. 23 0
      JavaWeb03/.idea/artifacts/servlet02_war_exploded.xml
  3. 14 0
      JavaWeb03/.idea/artifacts/servlet03_war.xml
  4. 23 0
      JavaWeb03/.idea/artifacts/servlet03_war_exploded.xml
  5. 14 0
      JavaWeb03/.idea/artifacts/servlet04_login_war.xml
  6. 23 0
      JavaWeb03/.idea/artifacts/servlet04_login_war_exploded.xml
  7. 21 15
      JavaWeb03/.idea/compiler.xml
  8. 12 6
      JavaWeb03/.idea/encodings.xml
  9. 14 0
      JavaWeb03/.idea/libraries/book.xml
  10. 21 15
      JavaWeb03/.idea/misc.xml
  11. 11 8
      JavaWeb03/.idea/modules.xml
  12. 124 0
      JavaWeb03/.idea/uiDesigner.xml
  13. 1 0
      JavaWeb03/servlet01/src/main/webapp/WEB-INF/web.xml
  14. 38 0
      JavaWeb03/servlet02/.gitignore
  15. BIN
      JavaWeb03/servlet02/.mvn/wrapper/maven-wrapper.jar
  16. 2 0
      JavaWeb03/servlet02/.mvn/wrapper/maven-wrapper.properties
  17. 0 0
      JavaWeb03/servlet02/b.txt
  18. 0 0
      JavaWeb03/servlet02/c.txt
  19. 316 0
      JavaWeb03/servlet02/mvnw
  20. 188 0
      JavaWeb03/servlet02/mvnw.cmd
  21. 50 0
      JavaWeb03/servlet02/pom.xml
  22. 38 0
      JavaWeb03/servlet02/src/main/java/com/lovecoding/servlet/request01/RequestServlet01.java
  23. 32 0
      JavaWeb03/servlet02/src/main/java/com/lovecoding/servlet/request01/RequestServlet02.java
  24. 37 0
      JavaWeb03/servlet02/src/main/java/com/lovecoding/servlet/request01/RequestServlet03.java
  25. 33 0
      JavaWeb03/servlet02/src/main/java/com/lovecoding/servlet/request01/RequestServlet04A.java
  26. 35 0
      JavaWeb03/servlet02/src/main/java/com/lovecoding/servlet/request01/RequestServlet04B.java
  27. 41 0
      JavaWeb03/servlet02/src/main/java/com/lovecoding/servlet/servlet02/Servlet.java
  28. 50 0
      JavaWeb03/servlet02/src/main/java/com/lovecoding/servlet/servlet02/Servlet2.java
  29. 61 0
      JavaWeb03/servlet02/src/main/java/com/lovecoding/servlet/servlet02/Servlet3_ServletContext.java
  30. 27 0
      JavaWeb03/servlet02/src/main/webapp/WEB-INF/web.xml
  31. 0 0
      JavaWeb03/servlet02/src/main/webapp/a.txt
  32. 49 0
      JavaWeb03/servlet02/src/main/webapp/index.jsp
  33. 8 0
      JavaWeb03/servlet02/src/main/webapp/success.html
  34. 38 0
      JavaWeb03/servlet03/.gitignore
  35. BIN
      JavaWeb03/servlet03/.mvn/wrapper/maven-wrapper.jar
  36. 2 0
      JavaWeb03/servlet03/.mvn/wrapper/maven-wrapper.properties
  37. 316 0
      JavaWeb03/servlet03/mvnw
  38. 188 0
      JavaWeb03/servlet03/mvnw.cmd
  39. 50 0
      JavaWeb03/servlet03/pom.xml
  40. 38 0
      JavaWeb03/servlet03/src/main/java/com/lovecoding/servlet03/LoginServlet.java
  41. 32 0
      JavaWeb03/servlet03/src/main/java/com/lovecoding/servlet03/ResonseServlet01.java
  42. 25 0
      JavaWeb03/servlet03/src/main/java/com/lovecoding/servlet03/ResonseServlet02.java
  43. 6 0
      JavaWeb03/servlet03/src/main/webapp/WEB-INF/web.xml
  44. 10 0
      JavaWeb03/servlet03/src/main/webapp/error.html
  45. 25 0
      JavaWeb03/servlet03/src/main/webapp/index.jsp
  46. 10 0
      JavaWeb03/servlet03/src/main/webapp/success.html
  47. 38 0
      JavaWeb03/servlet04_login/.gitignore
  48. BIN
      JavaWeb03/servlet04_login/.mvn/wrapper/maven-wrapper.jar
  49. 2 0
      JavaWeb03/servlet04_login/.mvn/wrapper/maven-wrapper.properties
  50. 316 0
      JavaWeb03/servlet04_login/mvnw
  51. 188 0
      JavaWeb03/servlet04_login/mvnw.cmd
  52. 50 0
      JavaWeb03/servlet04_login/pom.xml
  53. 49 0
      JavaWeb03/servlet04_login/src/main/java/com/lovecoding/book/bean/User.java
  54. 111 0
      JavaWeb03/servlet04_login/src/main/java/com/lovecoding/book/dao/BaseDao.java
  55. 18 0
      JavaWeb03/servlet04_login/src/main/java/com/lovecoding/book/dao/UserDao.java
  56. 33 0
      JavaWeb03/servlet04_login/src/main/java/com/lovecoding/book/dao/impl/UserDaoImpl.java
  57. 19 0
      JavaWeb03/servlet04_login/src/main/java/com/lovecoding/book/service/UserService.java
  58. 30 0
      JavaWeb03/servlet04_login/src/main/java/com/lovecoding/book/service/impl/UserServiceImpl.java
  59. 54 0
      JavaWeb03/servlet04_login/src/main/java/com/lovecoding/book/servlet/LoginServlet.java
  60. 42 0
      JavaWeb03/servlet04_login/src/main/java/com/lovecoding/book/servlet/ModelBaseServlet.java
  61. 49 0
      JavaWeb03/servlet04_login/src/main/java/com/lovecoding/book/servlet/RegisterServlet.java
  62. 22 0
      JavaWeb03/servlet04_login/src/main/java/com/lovecoding/book/servlet/UserServlet.java
  63. 75 0
      JavaWeb03/servlet04_login/src/main/java/com/lovecoding/book/utils/JDBCUtils.java
  64. 56 0
      JavaWeb03/servlet04_login/src/main/java/com/lovecoding/book/utils/MD5Util.java
  65. 7 0
      JavaWeb03/servlet04_login/src/main/resources/jdbc.properties
  66. BIN
      JavaWeb03/servlet04_login/src/main/webapp/WEB-INF/lib/commons-beanutils-1.8.3.jar
  67. BIN
      JavaWeb03/servlet04_login/src/main/webapp/WEB-INF/lib/commons-beanutils-bean-collections-1.8.3.jar
  68. BIN
      JavaWeb03/servlet04_login/src/main/webapp/WEB-INF/lib/commons-dbutils-1.4.jar
  69. BIN
      JavaWeb03/servlet04_login/src/main/webapp/WEB-INF/lib/commons-logging-1.1.1.jar
  70. BIN
      JavaWeb03/servlet04_login/src/main/webapp/WEB-INF/lib/druid-1.0.9.jar
  71. BIN
      JavaWeb03/servlet04_login/src/main/webapp/WEB-INF/lib/mysql-connector-java-8.0.19.jar
  72. 6 0
      JavaWeb03/servlet04_login/src/main/webapp/WEB-INF/web.xml
  73. 436 0
      JavaWeb03/servlet04_login/src/main/webapp/index.html
  74. 193 0
      JavaWeb03/servlet04_login/src/main/webapp/pages/cart/cart.html
  75. 63 0
      JavaWeb03/servlet04_login/src/main/webapp/pages/cart/checkout.html
  76. 80 0
      JavaWeb03/servlet04_login/src/main/webapp/pages/manager/book_add.html
  77. 80 0
      JavaWeb03/servlet04_login/src/main/webapp/pages/manager/book_edit.html
  78. 154 0
      JavaWeb03/servlet04_login/src/main/webapp/pages/manager/book_manager.html
  79. 36 0
      JavaWeb03/servlet04_login/src/main/webapp/pages/manager/manager.html
  80. 151 0
      JavaWeb03/servlet04_login/src/main/webapp/pages/manager/order_manager.html
  81. 154 0
      JavaWeb03/servlet04_login/src/main/webapp/pages/order/order.html
  82. 101 0
      JavaWeb03/servlet04_login/src/main/webapp/pages/user/login.html
  83. 43 0
      JavaWeb03/servlet04_login/src/main/webapp/pages/user/login_success.html
  84. 151 0
      JavaWeb03/servlet04_login/src/main/webapp/pages/user/regist.html
  85. 39 0
      JavaWeb03/servlet04_login/src/main/webapp/pages/user/regist_success.html
  86. 87 0
      JavaWeb03/servlet04_login/src/main/webapp/static/css/bookManger.css
  87. 24 0
      JavaWeb03/servlet04_login/src/main/webapp/static/css/book_edit.css
  88. 217 0
      JavaWeb03/servlet04_login/src/main/webapp/static/css/cart.css
  89. 12 0
      JavaWeb03/servlet04_login/src/main/webapp/static/css/common.css
  90. 3 0
      JavaWeb03/servlet04_login/src/main/webapp/static/css/iconfont.css
  91. 473 0
      JavaWeb03/servlet04_login/src/main/webapp/static/css/index.css
  92. 97 0
      JavaWeb03/servlet04_login/src/main/webapp/static/css/minireset.css
  93. 9 0
      JavaWeb03/servlet04_login/src/main/webapp/static/css/orderManger.css
  94. 65 0
      JavaWeb03/servlet04_login/src/main/webapp/static/css/register.css
  95. 360 0
      JavaWeb03/servlet04_login/src/main/webapp/static/css/style.css
  96. 11 0
      JavaWeb03/servlet04_login/src/main/webapp/static/css/swiper.min.css
  97. BIN
      JavaWeb03/servlet04_login/src/main/webapp/static/img/QR.gif
  98. BIN
      JavaWeb03/servlet04_login/src/main/webapp/static/img/bottom.png
  99. BIN
      JavaWeb03/servlet04_login/src/main/webapp/static/img/bottom1.png
  100. BIN
      JavaWeb03/servlet04_login/src/main/webapp/static/img/bottom2.png

+ 14 - 0
JavaWeb03/.idea/artifacts/servlet02_war.xml

@@ -0,0 +1,14 @@
+<component name="ArtifactManager">
+  <artifact type="war" name="servlet02:war">
+    <output-path>$PROJECT_DIR$/servlet02/target</output-path>
+    <properties id="maven-jee-properties">
+      <options>
+        <module>servlet02</module>
+        <packaging>war</packaging>
+      </options>
+    </properties>
+    <root id="archive" name="servlet02-1.0-SNAPSHOT.war">
+      <element id="artifact" artifact-name="servlet02:war exploded" />
+    </root>
+  </artifact>
+</component>

+ 23 - 0
JavaWeb03/.idea/artifacts/servlet02_war_exploded.xml

@@ -0,0 +1,23 @@
+<component name="ArtifactManager">
+  <artifact type="exploded-war" name="servlet02:war exploded">
+    <output-path>$PROJECT_DIR$/servlet02/target/servlet02-1.0-SNAPSHOT</output-path>
+    <properties id="maven-jee-properties">
+      <options>
+        <exploded>true</exploded>
+        <module>servlet02</module>
+        <packaging>war</packaging>
+      </options>
+    </properties>
+    <root id="root">
+      <element id="directory" name="WEB-INF">
+        <element id="directory" name="classes">
+          <element id="module-output" name="servlet02" />
+        </element>
+      </element>
+      <element id="directory" name="META-INF">
+        <element id="file-copy" path="$PROJECT_DIR$/servlet02/target/servlet02-1.0-SNAPSHOT/META-INF/MANIFEST.MF" />
+      </element>
+      <element id="javaee-facet-resources" facet="servlet02/web/Web" />
+    </root>
+  </artifact>
+</component>

+ 14 - 0
JavaWeb03/.idea/artifacts/servlet03_war.xml

@@ -0,0 +1,14 @@
+<component name="ArtifactManager">
+  <artifact type="war" name="servlet03:war">
+    <output-path>$PROJECT_DIR$/servlet03/target</output-path>
+    <properties id="maven-jee-properties">
+      <options>
+        <module>servlet03</module>
+        <packaging>war</packaging>
+      </options>
+    </properties>
+    <root id="archive" name="servlet03-1.0-SNAPSHOT.war">
+      <element id="artifact" artifact-name="servlet03:war exploded" />
+    </root>
+  </artifact>
+</component>

+ 23 - 0
JavaWeb03/.idea/artifacts/servlet03_war_exploded.xml

@@ -0,0 +1,23 @@
+<component name="ArtifactManager">
+  <artifact type="exploded-war" name="servlet03:war exploded">
+    <output-path>$PROJECT_DIR$/servlet03/target/servlet03-1.0-SNAPSHOT</output-path>
+    <properties id="maven-jee-properties">
+      <options>
+        <exploded>true</exploded>
+        <module>servlet03</module>
+        <packaging>war</packaging>
+      </options>
+    </properties>
+    <root id="root">
+      <element id="directory" name="WEB-INF">
+        <element id="directory" name="classes">
+          <element id="module-output" name="servlet03" />
+        </element>
+      </element>
+      <element id="directory" name="META-INF">
+        <element id="file-copy" path="$PROJECT_DIR$/servlet03/target/servlet03-1.0-SNAPSHOT/META-INF/MANIFEST.MF" />
+      </element>
+      <element id="javaee-facet-resources" facet="servlet03/web/Web" />
+    </root>
+  </artifact>
+</component>

+ 14 - 0
JavaWeb03/.idea/artifacts/servlet04_login_war.xml

@@ -0,0 +1,14 @@
+<component name="ArtifactManager">
+  <artifact type="war" name="servlet04_login:war">
+    <output-path>$PROJECT_DIR$/servlet04_login/target</output-path>
+    <properties id="maven-jee-properties">
+      <options>
+        <module>servlet04_login</module>
+        <packaging>war</packaging>
+      </options>
+    </properties>
+    <root id="archive" name="servlet04_login-1.0-SNAPSHOT.war">
+      <element id="artifact" artifact-name="servlet04_login:war exploded" />
+    </root>
+  </artifact>
+</component>

+ 23 - 0
JavaWeb03/.idea/artifacts/servlet04_login_war_exploded.xml

@@ -0,0 +1,23 @@
+<component name="ArtifactManager">
+  <artifact type="exploded-war" name="servlet04_login:war exploded">
+    <output-path>$PROJECT_DIR$/servlet04_login/target/servlet04_login-1.0-SNAPSHOT</output-path>
+    <properties id="maven-jee-properties">
+      <options>
+        <exploded>true</exploded>
+        <module>servlet04_login</module>
+        <packaging>war</packaging>
+      </options>
+    </properties>
+    <root id="root">
+      <element id="directory" name="WEB-INF">
+        <element id="directory" name="classes">
+          <element id="module-output" name="servlet04_login" />
+        </element>
+      </element>
+      <element id="directory" name="META-INF">
+        <element id="file-copy" path="$PROJECT_DIR$/servlet04_login/target/servlet04_login-1.0-SNAPSHOT/META-INF/MANIFEST.MF" />
+      </element>
+      <element id="javaee-facet-resources" facet="servlet04_login/web/Web" />
+    </root>
+  </artifact>
+</component>

+ 21 - 15
JavaWeb03/.idea/compiler.xml

@@ -1,16 +1,22 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="CompilerConfiguration">
-    <annotationProcessing>
-      <profile name="Maven default annotation processors profile" enabled="true">
-        <sourceOutputDir name="target/generated-sources/annotations" />
-        <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
-        <outputRelativeToContentRoot value="true" />
-        <module name="servlet01" />
-      </profile>
-    </annotationProcessing>
-    <bytecodeTargetLevel>
-      <module name="servlet01" target="1.8" />
-    </bytecodeTargetLevel>
-  </component>
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="CompilerConfiguration">
+    <annotationProcessing>
+      <profile name="Maven default annotation processors profile" enabled="true">
+        <sourceOutputDir name="target/generated-sources/annotations" />
+        <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
+        <outputRelativeToContentRoot value="true" />
+        <module name="servlet03" />
+        <module name="servlet04_login" />
+        <module name="servlet01" />
+        <module name="servlet02" />
+      </profile>
+    </annotationProcessing>
+    <bytecodeTargetLevel>
+      <module name="servlet01" target="1.8" />
+      <module name="servlet02" target="1.8" />
+      <module name="servlet03" target="1.8" />
+      <module name="servlet04_login" target="1.8" />
+    </bytecodeTargetLevel>
+  </component>
 </project>

+ 12 - 6
JavaWeb03/.idea/encodings.xml

@@ -1,7 +1,13 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="Encoding">
-    <file url="file://$PROJECT_DIR$/servlet01/src/main/java" charset="UTF-8" />
-    <file url="file://$PROJECT_DIR$/servlet01/src/main/resources" charset="UTF-8" />
-  </component>
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding">
+    <file url="file://$PROJECT_DIR$/servlet01/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/servlet01/src/main/resources" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/servlet02/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/servlet02/src/main/resources" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/servlet03/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/servlet03/src/main/resources" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/servlet04_login/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/servlet04_login/src/main/resources" charset="UTF-8" />
+  </component>
 </project>

+ 14 - 0
JavaWeb03/.idea/libraries/book.xml

@@ -0,0 +1,14 @@
+<component name="libraryTable">
+  <library name="book">
+    <CLASSES>
+      <root url="jar://$PROJECT_DIR$/servlet04_login/src/main/webapp/WEB-INF/lib/commons-beanutils-1.8.3.jar!/" />
+      <root url="jar://$PROJECT_DIR$/servlet04_login/src/main/webapp/WEB-INF/lib/commons-beanutils-bean-collections-1.8.3.jar!/" />
+      <root url="jar://$PROJECT_DIR$/servlet04_login/src/main/webapp/WEB-INF/lib/commons-dbutils-1.4.jar!/" />
+      <root url="jar://$PROJECT_DIR$/servlet04_login/src/main/webapp/WEB-INF/lib/commons-logging-1.1.1.jar!/" />
+      <root url="jar://$PROJECT_DIR$/servlet04_login/src/main/webapp/WEB-INF/lib/druid-1.0.9.jar!/" />
+      <root url="jar://$PROJECT_DIR$/servlet04_login/src/main/webapp/WEB-INF/lib/mysql-connector-java-8.0.19.jar!/" />
+    </CLASSES>
+    <JAVADOC />
+    <SOURCES />
+  </library>
+</component>

+ 21 - 15
JavaWeb03/.idea/misc.xml

@@ -1,16 +1,22 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="FrameworkDetectionExcludesConfiguration">
-    <file type="web" url="file://$PROJECT_DIR$/servlet01" />
-  </component>
-  <component name="MavenProjectsManager">
-    <option name="originalFiles">
-      <list>
-        <option value="$PROJECT_DIR$/servlet01/pom.xml" />
-      </list>
-    </option>
-  </component>
-  <component name="ProjectRootManager">
-    <output url="file://$PROJECT_DIR$/out" />
-  </component>
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="FrameworkDetectionExcludesConfiguration">
+    <file type="web" url="file://$PROJECT_DIR$/servlet01" />
+    <file type="web" url="file://$PROJECT_DIR$/servlet02" />
+    <file type="web" url="file://$PROJECT_DIR$/servlet03" />
+    <file type="web" url="file://$PROJECT_DIR$/servlet04_login" />
+  </component>
+  <component name="MavenProjectsManager">
+    <option name="originalFiles">
+      <list>
+        <option value="$PROJECT_DIR$/servlet01/pom.xml" />
+        <option value="$PROJECT_DIR$/servlet02/pom.xml" />
+        <option value="$PROJECT_DIR$/servlet03/pom.xml" />
+        <option value="$PROJECT_DIR$/servlet04_login/pom.xml" />
+      </list>
+    </option>
+  </component>
+  <component name="ProjectRootManager">
+    <output url="file://$PROJECT_DIR$/out" />
+  </component>
 </project>

+ 11 - 8
JavaWeb03/.idea/modules.xml

@@ -1,9 +1,12 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="ProjectModuleManager">
-    <modules>
-      <module fileurl="file://$PROJECT_DIR$/JavaWeb03.iml" filepath="$PROJECT_DIR$/JavaWeb03.iml" />
-      <module fileurl="file://$PROJECT_DIR$/servlet01/servlet01.iml" filepath="$PROJECT_DIR$/servlet01/servlet01.iml" />
-    </modules>
-  </component>
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/JavaWeb03.iml" filepath="$PROJECT_DIR$/JavaWeb03.iml" />
+      <module fileurl="file://$PROJECT_DIR$/servlet01/servlet01.iml" filepath="$PROJECT_DIR$/servlet01/servlet01.iml" />
+      <module fileurl="file://$PROJECT_DIR$/servlet02/servlet02.iml" filepath="$PROJECT_DIR$/servlet02/servlet02.iml" />
+      <module fileurl="file://$PROJECT_DIR$/servlet03/servlet03.iml" filepath="$PROJECT_DIR$/servlet03/servlet03.iml" />
+      <module fileurl="file://$PROJECT_DIR$/servlet04_login/servlet04_login.iml" filepath="$PROJECT_DIR$/servlet04_login/servlet04_login.iml" />
+    </modules>
+  </component>
 </project>

+ 124 - 0
JavaWeb03/.idea/uiDesigner.xml

@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Palette2">
+    <group name="Swing">
+      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
+      </item>
+      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
+        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
+        <initial-values>
+          <property name="text" value="Button" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="RadioButton" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="CheckBox" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="Label" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
+          <preferred-size width="-1" height="20" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
+      </item>
+    </group>
+  </component>
+</project>

+ 1 - 0
JavaWeb03/servlet01/src/main/webapp/WEB-INF/web.xml

@@ -13,6 +13,7 @@
         <servlet-class>com.lovecoding.servlet01.HelloServlet</servlet-class>
 
         <!-- <load-on-startup>1</load-on-startup> -->
+
     </servlet>
 
     <!--

+ 38 - 0
JavaWeb03/servlet02/.gitignore

@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store

BIN
JavaWeb03/servlet02/.mvn/wrapper/maven-wrapper.jar


+ 2 - 0
JavaWeb03/servlet02/.mvn/wrapper/maven-wrapper.properties

@@ -0,0 +1,2 @@
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.zip
+wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar

+ 0 - 0
JavaWeb03/servlet02/b.txt


+ 0 - 0
JavaWeb03/servlet02/c.txt


+ 316 - 0
JavaWeb03/servlet02/mvnw

@@ -0,0 +1,316 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# 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
+#
+#    https://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.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+#   JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+#   M2_HOME - location of maven2's installed home dir
+#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
+#     e.g. to debug Maven itself, use
+#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+  if [ -f /usr/local/etc/mavenrc ] ; then
+    . /usr/local/etc/mavenrc
+  fi
+
+  if [ -f /etc/mavenrc ] ; then
+    . /etc/mavenrc
+  fi
+
+  if [ -f "$HOME/.mavenrc" ] ; then
+    . "$HOME/.mavenrc"
+  fi
+
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  MINGW*) mingw=true;;
+  Darwin*) darwin=true
+    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+    if [ -z "$JAVA_HOME" ]; then
+      if [ -x "/usr/libexec/java_home" ]; then
+        export JAVA_HOME="`/usr/libexec/java_home`"
+      else
+        export JAVA_HOME="/Library/Java/Home"
+      fi
+    fi
+    ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+  if [ -r /etc/gentoo-release ] ; then
+    JAVA_HOME=`java-config --jre-home`
+  fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+  ## resolve links - $0 may be a link to maven's home
+  PRG="$0"
+
+  # need this for relative symlinks
+  while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+      PRG="$link"
+    else
+      PRG="`dirname "$PRG"`/$link"
+    fi
+  done
+
+  saveddir=`pwd`
+
+  M2_HOME=`dirname "$PRG"`/..
+
+  # make it fully qualified
+  M2_HOME=`cd "$M2_HOME" && pwd`
+
+  cd "$saveddir"
+  # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --unix "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME="`(cd "$M2_HOME"; pwd)`"
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+  javaExecutable="`which javac`"
+  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+    # readlink(1) is not available as standard on Solaris 10.
+    readLink=`which readlink`
+    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+      if $darwin ; then
+        javaHome="`dirname \"$javaExecutable\"`"
+        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+      else
+        javaExecutable="`readlink -f \"$javaExecutable\"`"
+      fi
+      javaHome="`dirname \"$javaExecutable\"`"
+      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+      JAVA_HOME="$javaHome"
+      export JAVA_HOME
+    fi
+  fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD="`\\unset -f command; \\command -v java`"
+  fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly." >&2
+  echo "  We cannot execute $JAVACMD" >&2
+  exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+  echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+  if [ -z "$1" ]
+  then
+    echo "Path not specified to find_maven_basedir"
+    return 1
+  fi
+
+  basedir="$1"
+  wdir="$1"
+  while [ "$wdir" != '/' ] ; do
+    if [ -d "$wdir"/.mvn ] ; then
+      basedir=$wdir
+      break
+    fi
+    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+    if [ -d "${wdir}" ]; then
+      wdir=`cd "$wdir/.."; pwd`
+    fi
+    # end of workaround
+  done
+  echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+  if [ -f "$1" ]; then
+    echo "$(tr -s '\n' ' ' < "$1")"
+  fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+  exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Found .mvn/wrapper/maven-wrapper.jar"
+    fi
+else
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+    fi
+    if [ -n "$MVNW_REPOURL" ]; then
+      jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+    else
+      jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+    fi
+    while IFS="=" read key value; do
+      case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+      esac
+    done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Downloading from: $jarUrl"
+    fi
+    wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+    if $cygwin; then
+      wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+    fi
+
+    if command -v wget > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found wget ... using wget"
+        fi
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+            wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
+        else
+            wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
+        fi
+    elif command -v curl > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found curl ... using curl"
+        fi
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+            curl -o "$wrapperJarPath" "$jarUrl" -f
+        else
+            curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
+        fi
+
+    else
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Falling back to using Java to download"
+        fi
+        javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+        # For Cygwin, switch paths to Windows format before running javac
+        if $cygwin; then
+          javaClass=`cygpath --path --windows "$javaClass"`
+        fi
+        if [ -e "$javaClass" ]; then
+            if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Compiling MavenWrapperDownloader.java ..."
+                fi
+                # Compiling the Java class
+                ("$JAVA_HOME/bin/javac" "$javaClass")
+            fi
+            if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                # Running the downloader
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Running MavenWrapperDownloader.java ..."
+                fi
+                ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+            fi
+        fi
+    fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+  echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --path --windows "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+  $MAVEN_OPTS \
+  $MAVEN_DEBUG_OPTS \
+  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+  "-Dmaven.home=${M2_HOME}" \
+  "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

+ 188 - 0
JavaWeb03/servlet02/mvnw.cmd

@@ -0,0 +1,188 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements.  See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership.  The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License.  You may obtain a copy of the License at
+@REM
+@REM    https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied.  See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM     e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
+if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+
+FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+    IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Found %WRAPPER_JAR%
+    )
+) else (
+    if not "%MVNW_REPOURL%" == "" (
+        SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+    )
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Couldn't find %WRAPPER_JAR%, downloading it ...
+        echo Downloading from: %DOWNLOAD_URL%
+    )
+
+    powershell -Command "&{"^
+		"$webclient = new-object System.Net.WebClient;"^
+		"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+		"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+		"}"^
+		"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
+		"}"
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Finished downloading %WRAPPER_JAR%
+    )
+)
+@REM End of extension
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% ^
+  %JVM_CONFIG_MAVEN_PROPS% ^
+  %MAVEN_OPTS% ^
+  %MAVEN_DEBUG_OPTS% ^
+  -classpath %WRAPPER_JAR% ^
+  "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
+  %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
+if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%"=="on" pause
+
+if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
+
+cmd /C exit /B %ERROR_CODE%

+ 50 - 0
JavaWeb03/servlet02/pom.xml

@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.lovecoding.servlet</groupId>
+    <artifactId>servlet02</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <name>servlet02</name>
+    <packaging>war</packaging>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compiler.target>1.8</maven.compiler.target>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <junit.version>5.8.2</junit.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+            <version>4.0.1</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-api</artifactId>
+            <version>${junit.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-engine</artifactId>
+            <version>${junit.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <version>3.3.2</version>
+            </plugin>
+        </plugins>
+    </build>
+</project>

+ 38 - 0
JavaWeb03/servlet02/src/main/java/com/lovecoding/servlet/request01/RequestServlet01.java

@@ -0,0 +1,38 @@
+package com.lovecoding.servlet.request01; /**
+ * ClassName: ${NAME}
+ * Package: ${PACKAGE_NAME}
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/6/3 14:41
+ * @Version 1.0
+ */
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.servlet.annotation.*;
+import java.io.IOException;
+import java.util.Arrays;
+
+@WebServlet(name = "RequestServlet01", value = "/RequestServlet01")
+public class RequestServlet01 extends HttpServlet {
+
+    //接收 通过表单提交 参数
+    @Override
+    public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        //接受  form name  key的值
+        //
+        String name = request.getParameter("name");
+        String pass = request.getParameter("pass");
+        String sex = request.getParameter("sex");
+        //接受多个 复选框  返回是数组 getParameterValues
+        String[] soccerTeam = request.getParameterValues("soccerTeam");
+
+        System.out.println("name:"+name);
+        System.out.println("pass:"+pass);
+        System.out.println("sex:"+sex);
+        System.out.println("soccerTeam:"+ Arrays.toString(soccerTeam));
+
+    }
+
+}

+ 32 - 0
JavaWeb03/servlet02/src/main/java/com/lovecoding/servlet/request01/RequestServlet02.java

@@ -0,0 +1,32 @@
+package com.lovecoding.servlet.request01; /**
+ * ClassName: ${NAME}
+ * Package: ${PACKAGE_NAME}
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/6/3 14:54
+ * @Version 1.0
+ */
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.servlet.annotation.*;
+import java.io.IOException;
+
+@WebServlet(name = "RequestServlet02", value = "/RequestServlet02")
+public class RequestServlet02 extends HttpServlet {
+    @Override
+    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        String path = request.getContextPath();
+
+        System.out.println("上下文路径:"+path);
+        System.out.println("端口号:"+request.getServerPort());
+        System.out.println("端口号:"+request.getLocalPort());
+        System.out.println("主机名:"+request.getServerName());
+        System.out.println("协议:"+request.getScheme());
+
+        StringBuffer requestURL = request.getRequestURL();
+        System.out.println("请求路径:"+requestURL);
+    }
+
+}

+ 37 - 0
JavaWeb03/servlet02/src/main/java/com/lovecoding/servlet/request01/RequestServlet03.java

@@ -0,0 +1,37 @@
+package com.lovecoding.servlet.request01; /**
+ * ClassName: ${NAME}
+ * Package: ${PACKAGE_NAME}
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/6/3 14:54
+ * @Version 1.0
+ */
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+@WebServlet(name = "RequestServlet03", value = "/RequestServlet03")
+public class RequestServlet03 extends HttpServlet {
+    @Override
+    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        String path = request.getContextPath();
+
+        String UserAgent = request.getHeader("User-Agent");
+        System.out.println("User-Agent:"+UserAgent);
+
+        String Referer = request.getHeader("Referer");
+        System.out.println("Referer:"+Referer);
+
+        String Host = request.getHeader("Host");
+        System.out.println("Host:"+Host);
+
+        String Connection = request.getHeader("Connection");
+        System.out.println("Connection:"+Connection);
+    }
+
+}

+ 33 - 0
JavaWeb03/servlet02/src/main/java/com/lovecoding/servlet/request01/RequestServlet04A.java

@@ -0,0 +1,33 @@
+package com.lovecoding.servlet.request01; /**
+ * ClassName: ${NAME}
+ * Package: ${PACKAGE_NAME}
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/6/3 14:54
+ * @Version 1.0
+ */
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+@WebServlet(name = "RequestServlet04A", value = "/RequestServlet04A")
+public class RequestServlet04A extends HttpServlet {
+    @Override
+    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        //转发
+        System.out.println("RequestServlet04A 接收请求");
+
+        //存储
+        request.setAttribute("username","zs");
+        request.setAttribute("password","123456");
+
+        //s 另外的servelt
+        request.getRequestDispatcher("/RequestServlet04B").forward(request,response);
+    }
+
+}

+ 35 - 0
JavaWeb03/servlet02/src/main/java/com/lovecoding/servlet/request01/RequestServlet04B.java

@@ -0,0 +1,35 @@
+package com.lovecoding.servlet.request01; /**
+ * ClassName: ${NAME}
+ * Package: ${PACKAGE_NAME}
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/6/3 14:54
+ * @Version 1.0
+ */
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+@WebServlet(name = "RequestServlet04B", value = "/RequestServlet04B")
+public class RequestServlet04B extends HttpServlet {
+    @Override
+    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        //转发
+        System.out.println("RequestServlet04A 转发请求");
+
+        //获取数据
+        Object username = request.getAttribute("username");
+        Object password = request.getAttribute("password");
+
+        System.out.println(username);
+        System.out.println(password);
+
+        //s 另外的servelt
+        request.getRequestDispatcher("/success.html").forward(request,response);
+    }
+}

+ 41 - 0
JavaWeb03/servlet02/src/main/java/com/lovecoding/servlet/servlet02/Servlet.java

@@ -0,0 +1,41 @@
+package com.lovecoding.servlet.servlet02; /**
+ * ClassName: ${NAME}
+ * Package: ${PACKAGE_NAME}
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/6/3 9:41
+ * @Version 1.0
+ */
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.util.Enumeration;
+
+public class Servlet extends HttpServlet {
+
+    @Override
+    public void init(ServletConfig config) throws ServletException {
+        //获取参数
+        String username = config.getInitParameter("username");
+        System.out.println(username);
+
+        //获取所有
+        Enumeration<String> initParameterNames = config.getInitParameterNames();
+
+        while (initParameterNames.hasMoreElements()){
+            String s = initParameterNames.nextElement();
+            System.out.println(s);
+        }
+
+        //servletContext
+        ServletContext servletContext = config.getServletContext();
+
+        System.out.println(servletContext);
+
+        //名称
+        String servletName = config.getServletName();
+        System.out.println(servletName);
+    }
+}

+ 50 - 0
JavaWeb03/servlet02/src/main/java/com/lovecoding/servlet/servlet02/Servlet2.java

@@ -0,0 +1,50 @@
+package com.lovecoding.servlet.servlet02; /**
+ * ClassName: ${NAME}
+ * Package: ${PACKAGE_NAME}
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/6/3 9:55
+ * @Version 1.0
+ */
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.servlet.annotation.*;
+import java.io.IOException;
+import java.util.Enumeration;
+
+@WebServlet(
+        name = "Servlet2",
+        value = "/config2",
+        //设置注解
+        initParams ={
+                @WebInitParam(name="loginName",value = "zssa"),
+                @WebInitParam(name="loginPassword",value = "123456")
+        }
+)
+public class Servlet2 extends HttpServlet {
+    @Override
+    public void init(ServletConfig config) throws ServletException {
+        //获取参数
+        String username = config.getInitParameter("username");
+        System.out.println(username);
+
+        //获取所有
+        Enumeration<String> initParameterNames = config.getInitParameterNames();
+
+        while (initParameterNames.hasMoreElements()){
+            String s = initParameterNames.nextElement();
+            System.out.println("key:"+s + "value:"+config.getInitParameter(s));
+        }
+
+        //servletContext
+        ServletContext servletContext = config.getServletContext();
+
+        System.out.println(servletContext);
+
+        //名称
+        String servletName = config.getServletName();
+        System.out.println(servletName);
+    }
+}

+ 61 - 0
JavaWeb03/servlet02/src/main/java/com/lovecoding/servlet/servlet02/Servlet3_ServletContext.java

@@ -0,0 +1,61 @@
+package com.lovecoding.servlet.servlet02; /**
+ * ClassName: ${NAME}
+ * Package: ${PACKAGE_NAME}
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/6/3 11:31
+ * @Version 1.0
+ */
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.servlet.annotation.*;
+import java.io.IOException;
+
+@WebServlet(name = "Servlet3_ServletContext", value = "/sc")
+public class Servlet3_ServletContext extends HttpServlet {
+
+    @Override
+    public void init(ServletConfig config) throws ServletException {
+        //获取上下文对象 web引用对象
+        ServletContext servletContext = config.getServletContext();
+
+        //servletContext获取项目路径
+        String contextPath = servletContext.getContextPath();
+        System.out.println("contextPath:"+contextPath);
+
+        //绝对路径
+        String realPath1 = servletContext.getRealPath("/index.jsp");
+        String realPath2 = servletContext.getRealPath("src/main/webapp/a.txt");
+        String realPath3 = servletContext.getRealPath("/a.txt");
+        String realPath4 = servletContext.getRealPath("/JavaWeb03/servlet02/c.txt");
+
+        System.out.println("realPath"+realPath1);
+        System.out.println("realPath"+realPath2);
+        System.out.println("realPath"+realPath3);
+        System.out.println("realPath"+realPath4);
+
+        //存数据
+        servletContext.setAttribute("username","zs");
+
+        Object username = servletContext.getAttribute("username");
+        System.out.println(username);
+
+    }
+
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        //获取上下文对象
+        ServletContext servletContext  = request.getServletContext();
+
+        Object username = servletContext.getAttribute("username");
+        System.out.println(username);
+
+    }
+
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+
+    }
+}

+ 27 - 0
JavaWeb03/servlet02/src/main/webapp/WEB-INF/web.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
+         version="4.0">
+    <servlet>
+        <servlet-name>Servlet</servlet-name>
+        <servlet-class>com.lovecoding.servlet.servlet02.Servlet</servlet-class>
+        <!-- 配置参数  数据库信息 -->
+        <init-param>
+            <param-name>username</param-name>
+            <param-value>root</param-value>
+        </init-param>
+        <init-param>
+            <param-name>password</param-name>
+            <param-value>root</param-value>
+        </init-param>
+        <init-param>
+            <param-name>driverClass</param-name>
+            <param-value>com.mysq.jdbc.Driver</param-value>
+        </init-param>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>Servlet</servlet-name>
+        <url-pattern>/config</url-pattern>
+    </servlet-mapping>
+</web-app>

+ 0 - 0
JavaWeb03/servlet02/src/main/webapp/a.txt


+ 49 - 0
JavaWeb03/servlet02/src/main/webapp/index.jsp

@@ -0,0 +1,49 @@
+<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
+<!DOCTYPE html>
+<html>
+<head>
+    <title>JSP - Hello World</title>
+</head>
+<body>
+<h1><%= "Hello World!" %>
+</h1>
+<br/>
+<a href="config">config</a>
+<a href="/servlet02_war/config2">config</a>
+<a href="sc">servletcontext</a>
+
+
+<h1>接受参数</h1>
+
+<form action="RequestServlet01" method="post">
+    用户名:<input type="text" name="name" value="" />
+    <br />
+    密码:<input type="text" name="pass" value="" />
+    <br />
+    性别:<input type="radio" name="sex" value="1" /> 男
+    <input type="radio" name="sex" value="0" /> 女
+    <br />
+    你喜欢的足球队<br /><br />
+    巴西<input type="checkbox" name="soccerTeam" value="Brazil" />
+    德国<input type="checkbox" name="soccerTeam" value="German" />
+    荷兰<input type="checkbox" name="soccerTeam" value="Holland" />
+    <br />
+    <input type="submit" value="提交" />
+</form>
+
+<h1>获取url地址参数</h1>
+
+<a href="RequestServlet02">RequestServlet02——获取url地址参数</a>
+
+
+<h1>获取请求头信息</h1>
+
+<a href="RequestServlet03">RequestServlet03——获取请求头信息</a>
+
+<h1>转发</h1>
+
+<a href="RequestServlet04A">RequestServlet04A——转发</a>
+
+
+</body>
+</html>

+ 8 - 0
JavaWeb03/servlet02/src/main/webapp/success.html

@@ -0,0 +1,8 @@
+<html>
+<head>
+    <title>Title</title>
+</head>
+<body>
+    <h1>success</h1>
+</body>
+</html>

+ 38 - 0
JavaWeb03/servlet03/.gitignore

@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store

BIN
JavaWeb03/servlet03/.mvn/wrapper/maven-wrapper.jar


+ 2 - 0
JavaWeb03/servlet03/.mvn/wrapper/maven-wrapper.properties

@@ -0,0 +1,2 @@
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.zip
+wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar

+ 316 - 0
JavaWeb03/servlet03/mvnw

@@ -0,0 +1,316 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# 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
+#
+#    https://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.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+#   JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+#   M2_HOME - location of maven2's installed home dir
+#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
+#     e.g. to debug Maven itself, use
+#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+  if [ -f /usr/local/etc/mavenrc ] ; then
+    . /usr/local/etc/mavenrc
+  fi
+
+  if [ -f /etc/mavenrc ] ; then
+    . /etc/mavenrc
+  fi
+
+  if [ -f "$HOME/.mavenrc" ] ; then
+    . "$HOME/.mavenrc"
+  fi
+
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  MINGW*) mingw=true;;
+  Darwin*) darwin=true
+    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+    if [ -z "$JAVA_HOME" ]; then
+      if [ -x "/usr/libexec/java_home" ]; then
+        export JAVA_HOME="`/usr/libexec/java_home`"
+      else
+        export JAVA_HOME="/Library/Java/Home"
+      fi
+    fi
+    ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+  if [ -r /etc/gentoo-release ] ; then
+    JAVA_HOME=`java-config --jre-home`
+  fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+  ## resolve links - $0 may be a link to maven's home
+  PRG="$0"
+
+  # need this for relative symlinks
+  while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+      PRG="$link"
+    else
+      PRG="`dirname "$PRG"`/$link"
+    fi
+  done
+
+  saveddir=`pwd`
+
+  M2_HOME=`dirname "$PRG"`/..
+
+  # make it fully qualified
+  M2_HOME=`cd "$M2_HOME" && pwd`
+
+  cd "$saveddir"
+  # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --unix "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME="`(cd "$M2_HOME"; pwd)`"
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+  javaExecutable="`which javac`"
+  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+    # readlink(1) is not available as standard on Solaris 10.
+    readLink=`which readlink`
+    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+      if $darwin ; then
+        javaHome="`dirname \"$javaExecutable\"`"
+        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+      else
+        javaExecutable="`readlink -f \"$javaExecutable\"`"
+      fi
+      javaHome="`dirname \"$javaExecutable\"`"
+      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+      JAVA_HOME="$javaHome"
+      export JAVA_HOME
+    fi
+  fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD="`\\unset -f command; \\command -v java`"
+  fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly." >&2
+  echo "  We cannot execute $JAVACMD" >&2
+  exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+  echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+  if [ -z "$1" ]
+  then
+    echo "Path not specified to find_maven_basedir"
+    return 1
+  fi
+
+  basedir="$1"
+  wdir="$1"
+  while [ "$wdir" != '/' ] ; do
+    if [ -d "$wdir"/.mvn ] ; then
+      basedir=$wdir
+      break
+    fi
+    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+    if [ -d "${wdir}" ]; then
+      wdir=`cd "$wdir/.."; pwd`
+    fi
+    # end of workaround
+  done
+  echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+  if [ -f "$1" ]; then
+    echo "$(tr -s '\n' ' ' < "$1")"
+  fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+  exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Found .mvn/wrapper/maven-wrapper.jar"
+    fi
+else
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+    fi
+    if [ -n "$MVNW_REPOURL" ]; then
+      jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+    else
+      jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+    fi
+    while IFS="=" read key value; do
+      case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+      esac
+    done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Downloading from: $jarUrl"
+    fi
+    wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+    if $cygwin; then
+      wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+    fi
+
+    if command -v wget > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found wget ... using wget"
+        fi
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+            wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
+        else
+            wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
+        fi
+    elif command -v curl > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found curl ... using curl"
+        fi
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+            curl -o "$wrapperJarPath" "$jarUrl" -f
+        else
+            curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
+        fi
+
+    else
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Falling back to using Java to download"
+        fi
+        javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+        # For Cygwin, switch paths to Windows format before running javac
+        if $cygwin; then
+          javaClass=`cygpath --path --windows "$javaClass"`
+        fi
+        if [ -e "$javaClass" ]; then
+            if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Compiling MavenWrapperDownloader.java ..."
+                fi
+                # Compiling the Java class
+                ("$JAVA_HOME/bin/javac" "$javaClass")
+            fi
+            if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                # Running the downloader
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Running MavenWrapperDownloader.java ..."
+                fi
+                ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+            fi
+        fi
+    fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+  echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --path --windows "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+  $MAVEN_OPTS \
+  $MAVEN_DEBUG_OPTS \
+  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+  "-Dmaven.home=${M2_HOME}" \
+  "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

+ 188 - 0
JavaWeb03/servlet03/mvnw.cmd

@@ -0,0 +1,188 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements.  See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership.  The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License.  You may obtain a copy of the License at
+@REM
+@REM    https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied.  See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM     e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
+if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+
+FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+    IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Found %WRAPPER_JAR%
+    )
+) else (
+    if not "%MVNW_REPOURL%" == "" (
+        SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+    )
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Couldn't find %WRAPPER_JAR%, downloading it ...
+        echo Downloading from: %DOWNLOAD_URL%
+    )
+
+    powershell -Command "&{"^
+		"$webclient = new-object System.Net.WebClient;"^
+		"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+		"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+		"}"^
+		"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
+		"}"
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Finished downloading %WRAPPER_JAR%
+    )
+)
+@REM End of extension
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% ^
+  %JVM_CONFIG_MAVEN_PROPS% ^
+  %MAVEN_OPTS% ^
+  %MAVEN_DEBUG_OPTS% ^
+  -classpath %WRAPPER_JAR% ^
+  "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
+  %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
+if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%"=="on" pause
+
+if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
+
+cmd /C exit /B %ERROR_CODE%

+ 50 - 0
JavaWeb03/servlet03/pom.xml

@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.lovecoding</groupId>
+    <artifactId>servlet03</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <name>servlet03</name>
+    <packaging>war</packaging>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compiler.target>1.8</maven.compiler.target>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <junit.version>5.8.2</junit.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+            <version>4.0.1</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-api</artifactId>
+            <version>${junit.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-engine</artifactId>
+            <version>${junit.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <version>3.3.2</version>
+            </plugin>
+        </plugins>
+    </build>
+</project>

+ 38 - 0
JavaWeb03/servlet03/src/main/java/com/lovecoding/servlet03/LoginServlet.java

@@ -0,0 +1,38 @@
+package com.lovecoding.servlet03; /**
+ * ClassName: ${NAME}
+ * Package: ${PACKAGE_NAME}
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/6/8 19:19
+ * @Version 1.0
+ */
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.servlet.annotation.*;
+import java.io.IOException;
+
+@WebServlet(name = "LoginServlet", value = "/LoginServlet")
+public class LoginServlet extends HttpServlet {
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        //设置utf-8
+        request.setCharacterEncoding("utf-8");
+        //设置相应
+        response.setContentType("text/html;charset=utf-8");
+
+        //业务逻辑
+        String useranme = request.getParameter("username");
+        String password = request.getParameter("password");
+
+        //调用数据  模拟
+        if (useranme.equals("admin") && password.equals("123456") ){
+            //重定向
+            response.sendRedirect("success.html");
+        }else{
+            //携带数据 转发
+            request.getRequestDispatcher("/error.html").forward(request,response);
+        }
+    }
+}

+ 32 - 0
JavaWeb03/servlet03/src/main/java/com/lovecoding/servlet03/ResonseServlet01.java

@@ -0,0 +1,32 @@
+package com.lovecoding.servlet03; /**
+ * ClassName: ${NAME}
+ * Package: ${PACKAGE_NAME}
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/6/8 18:19
+ * @Version 1.0
+ */
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.servlet.annotation.*;
+import java.io.IOException;
+
+@WebServlet(name = "ResonseServlet01", value = "/ResonseServlet01")
+public class ResonseServlet01 extends HttpServlet {
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        //设置响应头
+        //response.setHeader("Content-Type","text/html;charset=utf-8");
+        //方式2
+        response.setContentType("text/html;charset=utf-8");
+        //写回数据
+        response.getWriter().write("成功");
+
+    }
+
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+
+    }
+}

+ 25 - 0
JavaWeb03/servlet03/src/main/java/com/lovecoding/servlet03/ResonseServlet02.java

@@ -0,0 +1,25 @@
+package com.lovecoding.servlet03; /**
+ * ClassName: ${NAME}
+ * Package: ${PACKAGE_NAME}
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/6/8 18:19
+ * @Version 1.0
+ */
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+@WebServlet(name = "ResonseServlet02", value = "/ResonseServlet02")
+public class ResonseServlet02 extends HttpServlet {
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        //重定向
+        response.sendRedirect(request.getContextPath()+"/success.html");
+    }
+}

+ 6 - 0
JavaWeb03/servlet03/src/main/webapp/WEB-INF/web.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
+         version="4.0">
+</web-app>

+ 10 - 0
JavaWeb03/servlet03/src/main/webapp/error.html

@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>Title</title>
+</head>
+<body>
+    <h1>登录失败</h1>
+</body>
+</html>

+ 25 - 0
JavaWeb03/servlet03/src/main/webapp/index.jsp

@@ -0,0 +1,25 @@
+<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
+<!DOCTYPE html>
+<html>
+<head>
+    <title>JSP - Hello World</title>
+</head>
+<body>
+<h1><%= "Hello World!" %>
+</h1>
+<br/>
+<a href="ResonseServlet01">ResponseServlet1</a>
+<a href="ResonseServlet02">ResponseServlet2—重定向</a>
+
+<hr>
+<!-- 登录 -->
+<form action="LoginServlet" method="post" >
+    用户名:<input type="text" name="username" placeholder="请输入用户名" >
+    <br>
+    密  码:<input type="text" name="password" placeholder="请输入密码" >
+    <br>
+    <input type="submit" value="登录" >
+</form>
+
+</body>
+</html>

+ 10 - 0
JavaWeb03/servlet03/src/main/webapp/success.html

@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>Title</title>
+</head>
+<body>
+    <h1>登录成功</h1>
+</body>
+</html>

+ 38 - 0
JavaWeb03/servlet04_login/.gitignore

@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store

BIN
JavaWeb03/servlet04_login/.mvn/wrapper/maven-wrapper.jar


+ 2 - 0
JavaWeb03/servlet04_login/.mvn/wrapper/maven-wrapper.properties

@@ -0,0 +1,2 @@
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.zip
+wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar

+ 316 - 0
JavaWeb03/servlet04_login/mvnw

@@ -0,0 +1,316 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# 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
+#
+#    https://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.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+#   JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+#   M2_HOME - location of maven2's installed home dir
+#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
+#     e.g. to debug Maven itself, use
+#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+  if [ -f /usr/local/etc/mavenrc ] ; then
+    . /usr/local/etc/mavenrc
+  fi
+
+  if [ -f /etc/mavenrc ] ; then
+    . /etc/mavenrc
+  fi
+
+  if [ -f "$HOME/.mavenrc" ] ; then
+    . "$HOME/.mavenrc"
+  fi
+
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  MINGW*) mingw=true;;
+  Darwin*) darwin=true
+    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+    if [ -z "$JAVA_HOME" ]; then
+      if [ -x "/usr/libexec/java_home" ]; then
+        export JAVA_HOME="`/usr/libexec/java_home`"
+      else
+        export JAVA_HOME="/Library/Java/Home"
+      fi
+    fi
+    ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+  if [ -r /etc/gentoo-release ] ; then
+    JAVA_HOME=`java-config --jre-home`
+  fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+  ## resolve links - $0 may be a link to maven's home
+  PRG="$0"
+
+  # need this for relative symlinks
+  while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+      PRG="$link"
+    else
+      PRG="`dirname "$PRG"`/$link"
+    fi
+  done
+
+  saveddir=`pwd`
+
+  M2_HOME=`dirname "$PRG"`/..
+
+  # make it fully qualified
+  M2_HOME=`cd "$M2_HOME" && pwd`
+
+  cd "$saveddir"
+  # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --unix "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME="`(cd "$M2_HOME"; pwd)`"
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+  javaExecutable="`which javac`"
+  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+    # readlink(1) is not available as standard on Solaris 10.
+    readLink=`which readlink`
+    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+      if $darwin ; then
+        javaHome="`dirname \"$javaExecutable\"`"
+        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+      else
+        javaExecutable="`readlink -f \"$javaExecutable\"`"
+      fi
+      javaHome="`dirname \"$javaExecutable\"`"
+      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+      JAVA_HOME="$javaHome"
+      export JAVA_HOME
+    fi
+  fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD="`\\unset -f command; \\command -v java`"
+  fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly." >&2
+  echo "  We cannot execute $JAVACMD" >&2
+  exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+  echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+  if [ -z "$1" ]
+  then
+    echo "Path not specified to find_maven_basedir"
+    return 1
+  fi
+
+  basedir="$1"
+  wdir="$1"
+  while [ "$wdir" != '/' ] ; do
+    if [ -d "$wdir"/.mvn ] ; then
+      basedir=$wdir
+      break
+    fi
+    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+    if [ -d "${wdir}" ]; then
+      wdir=`cd "$wdir/.."; pwd`
+    fi
+    # end of workaround
+  done
+  echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+  if [ -f "$1" ]; then
+    echo "$(tr -s '\n' ' ' < "$1")"
+  fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+  exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Found .mvn/wrapper/maven-wrapper.jar"
+    fi
+else
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+    fi
+    if [ -n "$MVNW_REPOURL" ]; then
+      jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+    else
+      jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+    fi
+    while IFS="=" read key value; do
+      case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+      esac
+    done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Downloading from: $jarUrl"
+    fi
+    wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+    if $cygwin; then
+      wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+    fi
+
+    if command -v wget > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found wget ... using wget"
+        fi
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+            wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
+        else
+            wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
+        fi
+    elif command -v curl > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found curl ... using curl"
+        fi
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+            curl -o "$wrapperJarPath" "$jarUrl" -f
+        else
+            curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
+        fi
+
+    else
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Falling back to using Java to download"
+        fi
+        javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+        # For Cygwin, switch paths to Windows format before running javac
+        if $cygwin; then
+          javaClass=`cygpath --path --windows "$javaClass"`
+        fi
+        if [ -e "$javaClass" ]; then
+            if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Compiling MavenWrapperDownloader.java ..."
+                fi
+                # Compiling the Java class
+                ("$JAVA_HOME/bin/javac" "$javaClass")
+            fi
+            if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                # Running the downloader
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Running MavenWrapperDownloader.java ..."
+                fi
+                ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+            fi
+        fi
+    fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+  echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --path --windows "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+  $MAVEN_OPTS \
+  $MAVEN_DEBUG_OPTS \
+  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+  "-Dmaven.home=${M2_HOME}" \
+  "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

+ 188 - 0
JavaWeb03/servlet04_login/mvnw.cmd

@@ -0,0 +1,188 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements.  See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership.  The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License.  You may obtain a copy of the License at
+@REM
+@REM    https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied.  See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM     e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
+if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+
+FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+    IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Found %WRAPPER_JAR%
+    )
+) else (
+    if not "%MVNW_REPOURL%" == "" (
+        SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+    )
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Couldn't find %WRAPPER_JAR%, downloading it ...
+        echo Downloading from: %DOWNLOAD_URL%
+    )
+
+    powershell -Command "&{"^
+		"$webclient = new-object System.Net.WebClient;"^
+		"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+		"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+		"}"^
+		"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
+		"}"
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Finished downloading %WRAPPER_JAR%
+    )
+)
+@REM End of extension
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% ^
+  %JVM_CONFIG_MAVEN_PROPS% ^
+  %MAVEN_OPTS% ^
+  %MAVEN_DEBUG_OPTS% ^
+  -classpath %WRAPPER_JAR% ^
+  "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
+  %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
+if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%"=="on" pause
+
+if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
+
+cmd /C exit /B %ERROR_CODE%

+ 50 - 0
JavaWeb03/servlet04_login/pom.xml

@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.example</groupId>
+    <artifactId>servlet04_login</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <name>servlet04_login</name>
+    <packaging>war</packaging>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compiler.target>1.8</maven.compiler.target>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <junit.version>5.8.2</junit.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+            <version>4.0.1</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-api</artifactId>
+            <version>${junit.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-engine</artifactId>
+            <version>${junit.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <version>3.3.2</version>
+            </plugin>
+        </plugins>
+    </build>
+</project>

+ 49 - 0
JavaWeb03/servlet04_login/src/main/java/com/lovecoding/book/bean/User.java

@@ -0,0 +1,49 @@
+package com.lovecoding.book.bean;
+
+/**
+ * ClassName: User
+ * Package: com.lovecoding.book.bean
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/6/10 11:21
+ * @Version 1.0
+ */
+public class User {
+    private int id;
+    private String username;
+    private String password;
+    private String email;
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+}

+ 111 - 0
JavaWeb03/servlet04_login/src/main/java/com/lovecoding/book/dao/BaseDao.java

@@ -0,0 +1,111 @@
+package com.lovecoding.book.dao;
+
+import com.lovecoding.book.utils.JDBCUtils;
+import org.apache.commons.dbutils.QueryRunner;
+import org.apache.commons.dbutils.handlers.BeanHandler;
+import org.apache.commons.dbutils.handlers.BeanListHandler;
+import org.apache.commons.dbutils.handlers.ScalarHandler;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.util.*;
+
+/**
+ * ClassName: BaseDao
+ * Package: com.lovecoding.book.dao
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/6/10 10:08
+ * @Version 1.0
+ */
+public class BaseDao<T> {
+    private QueryRunner runner=new QueryRunner(JDBCUtils.dataSource);
+    /**
+     * 功能:对数据库进行增删改的操作
+     * @param sql
+     * @param params
+     * @return
+     */
+    public boolean update(String sql,Object...params){
+        //1. 获得数据库连接
+        Connection connection = JDBCUtils.getConnection();
+        //3. 执行
+        try {
+            int update = runner.update(connection, sql, params);
+            if(update>0)
+                return true;
+        } catch (SQLException e) {
+            e.printStackTrace();
+        }finally {
+            //4. 释放资源
+            JDBCUtils.releaseConnection();
+        }
+        return false;
+    }
+
+    /**
+     * 功能:查询多条数据
+     * @param type
+     * @param sql
+     * @param params
+     * @return
+     */
+    public List<T> getBeanList(Class type,String sql,Object...params){
+        //1. 获得数据库连接
+        Connection connection = JDBCUtils.getConnection();
+        //3. 执行
+        try {
+            return runner.query(connection, sql, new BeanListHandler<T>(type), params);
+        } catch (SQLException e) {
+            e.printStackTrace();
+        }finally{
+            //4. 释放资源
+            JDBCUtils.releaseConnection();
+        }
+        return null;
+    }
+
+    /**
+     * 功能:查询一条结果
+     * @param type
+     * @param sql
+     * @param params
+     * @return
+     */
+    public T getBean(Class type,String sql,Object...params){
+        //1. 获得数据库连接
+        Connection connection = JDBCUtils.getConnection();
+        //3. 执行
+        try {
+            return runner.query(connection,sql,new BeanHandler<T>(type),params);
+        } catch (SQLException e) {
+            e.printStackTrace();
+        }finally{
+            //4. 释放资源
+            JDBCUtils.releaseConnection();
+        }
+        return null;
+    }
+
+    /**
+     * 功能:查询一个结果
+     * @param sql
+     * @param params
+     * @return
+     */
+    public Object getObject(String sql,Object...params){
+        //1. 获得数据库连接
+        Connection connection = JDBCUtils.getConnection();
+        //3. 执行
+        try {
+            return runner.query(connection,sql,new ScalarHandler(),params);
+        } catch (SQLException e) {
+            e.printStackTrace();
+        }finally{
+            //4. 释放资源
+            JDBCUtils.releaseConnection();
+        }
+        return null;
+    }
+}

+ 18 - 0
JavaWeb03/servlet04_login/src/main/java/com/lovecoding/book/dao/UserDao.java

@@ -0,0 +1,18 @@
+package com.lovecoding.book.dao;
+
+import com.lovecoding.book.bean.User;
+
+/**
+ * ClassName: UserDao
+ * Package: com.lovecoding.book.dao
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/6/10 11:25
+ * @Version 1.0
+ */
+public interface UserDao {
+    public User checkLogin(User user);
+
+    boolean regist(User user);
+}

+ 33 - 0
JavaWeb03/servlet04_login/src/main/java/com/lovecoding/book/dao/impl/UserDaoImpl.java

@@ -0,0 +1,33 @@
+package com.lovecoding.book.dao.impl;
+
+import com.lovecoding.book.bean.User;
+import com.lovecoding.book.dao.BaseDao;
+import com.lovecoding.book.dao.UserDao;
+
+/**
+ * ClassName: UserDaoImpl
+ * Package: com.lovecoding.book.dao.impl
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/6/10 11:25
+ * @Version 1.0
+ */
+public class UserDaoImpl  extends BaseDao<User> implements UserDao{
+    @Override
+    public User checkLogin(User user) {
+        //Class type,String sql,Object...params
+        //sql
+        String sql = " select * from t_user where username = ? and password = ? ";
+        //调用父类的方法
+        return getBean(User.class,sql,user.getUsername(),user.getPassword());
+    }
+
+    @Override
+    public boolean regist(User user) {
+        String sql = " INSERT INTO `t_user` ( `username`, `password`, `email`) " +
+                " VALUES ( ?, ?, ?) ";
+        //调用父类的方法
+        return update(sql,user.getUsername(),user.getPassword(),user.getEmail());
+    }
+}

+ 19 - 0
JavaWeb03/servlet04_login/src/main/java/com/lovecoding/book/service/UserService.java

@@ -0,0 +1,19 @@
+package com.lovecoding.book.service;
+
+import com.lovecoding.book.bean.User;
+
+/**
+ * ClassName: UserService
+ * Package: com.lovecoding.book.service
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/6/10 11:19
+ * @Version 1.0
+ */
+public interface UserService {
+
+    public User checkLogin(User user);
+
+    boolean regist(User user);
+}

+ 30 - 0
JavaWeb03/servlet04_login/src/main/java/com/lovecoding/book/service/impl/UserServiceImpl.java

@@ -0,0 +1,30 @@
+package com.lovecoding.book.service.impl;
+
+import com.lovecoding.book.bean.User;
+import com.lovecoding.book.dao.UserDao;
+import com.lovecoding.book.dao.impl.UserDaoImpl;
+import com.lovecoding.book.service.UserService;
+
+/**
+ * ClassName: UserService
+ * Package: com.lovecoding.book.service
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/6/10 11:19
+ * @Version 1.0
+ */
+public class UserServiceImpl implements UserService {
+    //dao
+    UserDao userDao = new UserDaoImpl();
+
+    @Override
+    public User checkLogin(User user) {
+        return userDao.checkLogin(user);
+    }
+
+    @Override
+    public boolean regist(User user) {
+        return userDao.regist(user);
+    }
+}

+ 54 - 0
JavaWeb03/servlet04_login/src/main/java/com/lovecoding/book/servlet/LoginServlet.java

@@ -0,0 +1,54 @@
+package com.lovecoding.book.servlet; /**
+ * ClassName: ${NAME}
+ * Package: ${PACKAGE_NAME}
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/6/10 11:16
+ * @Version 1.0
+ */
+
+import com.lovecoding.book.bean.User;
+import com.lovecoding.book.service.UserService;
+import com.lovecoding.book.service.impl.UserServiceImpl;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.servlet.annotation.*;
+import java.io.IOException;
+
+@WebServlet(name = "LoginServlet", value = "/login")
+public class LoginServlet extends HttpServlet {
+
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        //乱码
+        //响应内容
+
+        //获取参数
+        String useranme =  request.getParameter("username");
+        String password =  request.getParameter("password");
+
+        //验证  调用service
+        UserService userService = new UserServiceImpl();
+
+        //
+        //封装model
+        User user = new User();
+        user.setUsername(useranme);
+        user.setPassword(password);
+
+        //调用service
+        User user1 =  userService.checkLogin(user);
+
+        //判断 是否存在
+        if (user1 == null){
+            //失败返回登录
+            //重定向
+            response.sendRedirect(request.getContextPath()+ "/pages/user/login.html");
+        }else{
+            //重定向
+            response.sendRedirect(request.getContextPath()+ "/pages/user/login_success.html");
+        }
+    }
+}

+ 42 - 0
JavaWeb03/servlet04_login/src/main/java/com/lovecoding/book/servlet/ModelBaseServlet.java

@@ -0,0 +1,42 @@
+package com.lovecoding.book.servlet; /**
+ * ClassName: ${NAME}
+ * Package: ${PACKAGE_NAME}
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/6/12 13:59
+ * @Version 1.0
+ */
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.servlet.annotation.*;
+import java.io.IOException;
+import java.lang.reflect.Method;
+
+
+public class ModelBaseServlet extends HttpServlet {
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        doGet(request, response);
+    }
+
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        request.setCharacterEncoding("UTF-8");
+        response.setContentType("text/html;charset=UTF-8");
+        //获取请求参数method的值
+        String method = request.getParameter("method");
+        //method参数的值就是要调用的方法的方法名,那就是已知方法名要去查找调用本对象的方法
+        try {
+            Method declaredMethod = this.getClass().getDeclaredMethod(method, HttpServletRequest.class, HttpServletResponse.class);
+
+            //暴力反射
+            declaredMethod.setAccessible(true);
+            //调用方法
+            declaredMethod.invoke(this,request,response);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+}

+ 49 - 0
JavaWeb03/servlet04_login/src/main/java/com/lovecoding/book/servlet/RegisterServlet.java

@@ -0,0 +1,49 @@
+package com.lovecoding.book.servlet; /**
+ * ClassName: ${NAME}
+ * Package: ${PACKAGE_NAME}
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/6/10 11:16
+ * @Version 1.0
+ */
+
+import com.lovecoding.book.bean.User;
+import com.lovecoding.book.service.UserService;
+import com.lovecoding.book.service.impl.UserServiceImpl;
+import org.apache.commons.beanutils.BeanUtils;
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.Map;
+
+@WebServlet(name = "RegisterServlet", value = "/regist")
+public class RegisterServlet extends HttpServlet {
+
+    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        doGet(request,response);
+    }
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        //1. 获得请求参数(注册的数据)
+        Map<String, String[]> parameterMap = request.getParameterMap();
+        User user=new User();
+        try {
+            BeanUtils.populate(user,parameterMap);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        //2. 执行注册的业务
+        UserService userService = new UserServiceImpl();
+        boolean regist = userService.regist(user);
+        //3. 给响应
+        if(regist){
+            response.sendRedirect(request.getContextPath()+"/pages/user/regist_success.html");
+        }else{
+            response.sendRedirect(request.getContextPath()+"/pages/user/regist.html");
+        }
+    }
+}

+ 22 - 0
JavaWeb03/servlet04_login/src/main/java/com/lovecoding/book/servlet/UserServlet.java

@@ -0,0 +1,22 @@
+package com.lovecoding.book.servlet; /**
+ * ClassName: ${NAME}
+ * Package: ${PACKAGE_NAME}
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/6/12 14:01
+ * @Version 1.0
+ */
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.servlet.annotation.*;
+import java.io.IOException;
+
+@WebServlet(name = "UserServlet", value = "/UserServlet")
+public class UserServlet extends ModelBaseServlet {
+
+    public void showAll(HttpServletRequest request,HttpServletResponse response){
+        System.out.println("123");
+    }
+}

+ 75 - 0
JavaWeb03/servlet04_login/src/main/java/com/lovecoding/book/utils/JDBCUtils.java

@@ -0,0 +1,75 @@
+package com.lovecoding.book.utils;
+
+import com.alibaba.druid.pool.DruidDataSourceFactory;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+import javax.sql.*;
+import java.sql.Connection;
+
+/**
+ * ClassName: JDBCUtils
+ * Package: com.lovecoding.book.utils
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/6/10 10:00
+ * @Version 1.0
+ */
+public class JDBCUtils {
+    public static DataSource dataSource =null;
+    private static ThreadLocal<Connection> threadLocal = new ThreadLocal<>();
+    //创建连接池
+    static{
+        //读取属性文件
+        Properties prop = new Properties();
+                                                                                  // jdbc.properties
+        InputStream is = JDBCUtils.class.getClassLoader().getResourceAsStream("jdbc.properties");
+        try {
+            prop.load(is);
+            //根据属性文件创建连接池
+            dataSource = DruidDataSourceFactory.createDataSource(prop);
+        } catch (IOException e) {
+            e.printStackTrace();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    //获取数据库连接
+    public static Connection getConnection(){
+        //先从ThreadLocal中获取
+        Connection conn = threadLocal.get();
+        //如果没有连接,说明是该线程中第一次访问,
+        if(conn ==null ){
+            try {
+                //从连接池中获取一个连接
+                conn = dataSource.getConnection();
+                //放入到threadLocal中
+                threadLocal.set(conn);
+
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+        //返回连接
+        return conn;
+    }
+    //关闭数据库连接(如果采用了连接池,就是归还连接)
+    public static void releaseConnection(){
+        //从threadLocal中获取
+        Connection conn = threadLocal.get();
+        try {
+            if(conn !=null){
+                conn.close(); //不是物理关闭,而是放入到连接池中,置为空闲状态
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }finally {
+            //这个语句不要少
+            //threadLocal.set(null);//连接已经放回连接池,不使用了。ThreadLocal也不需要再保存了
+            threadLocal.remove();
+        }
+    }
+}

+ 56 - 0
JavaWeb03/servlet04_login/src/main/java/com/lovecoding/book/utils/MD5Util.java

@@ -0,0 +1,56 @@
+package com.lovecoding.book.utils;
+
+import java.math.BigInteger;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+
+/**
+ * ClassName: MD5Util
+ * Package: com.lovecoding.book.utils
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/6/10 10:06
+ * @Version 1.0
+ */
+public class MD5Util {
+    /**
+     * 针对明文字符串执行MD5加密
+     * @param source
+     * @return
+     */
+    public static String encode(String source) {
+
+        // 1.判断明文字符串是否有效
+        if (source == null || "".equals(source)) {
+            throw new RuntimeException("用于加密的明文不可为空");
+        }
+
+        // 2.声明算法名称
+        String algorithm = "md5";
+
+        // 3.获取MessageDigest对象
+        MessageDigest messageDigest = null;
+        try {
+            messageDigest = MessageDigest.getInstance(algorithm);
+        } catch (NoSuchAlgorithmException e) {
+            e.printStackTrace();
+        }
+
+        // 4.获取明文字符串对应的字节数组
+        byte[] input = source.getBytes();
+
+        // 5.执行加密
+        byte[] output = messageDigest.digest(input);
+
+        // 6.创建BigInteger对象
+        int signum = 1;
+        BigInteger bigInteger = new BigInteger(signum, output);
+
+        // 7.按照16进制将bigInteger的值转换为字符串
+        int radix = 16;
+        String encoded = bigInteger.toString(radix).toUpperCase();
+
+        return encoded;
+    }
+}

+ 7 - 0
JavaWeb03/servlet04_login/src/main/resources/jdbc.properties

@@ -0,0 +1,7 @@
+driverClassName=com.mysql.cj.jdbc.Driver
+url=jdbc:mysql://localhost:3306/bookstore?serverTimezone=UTC&rewriteBatchedStatements=true
+username=root
+password=123456
+initialSize=10
+maxActive=20
+maxWait=10000

BIN
JavaWeb03/servlet04_login/src/main/webapp/WEB-INF/lib/commons-beanutils-1.8.3.jar


BIN
JavaWeb03/servlet04_login/src/main/webapp/WEB-INF/lib/commons-beanutils-bean-collections-1.8.3.jar


BIN
JavaWeb03/servlet04_login/src/main/webapp/WEB-INF/lib/commons-dbutils-1.4.jar


BIN
JavaWeb03/servlet04_login/src/main/webapp/WEB-INF/lib/commons-logging-1.1.1.jar


BIN
JavaWeb03/servlet04_login/src/main/webapp/WEB-INF/lib/druid-1.0.9.jar


BIN
JavaWeb03/servlet04_login/src/main/webapp/WEB-INF/lib/mysql-connector-java-8.0.19.jar


+ 6 - 0
JavaWeb03/servlet04_login/src/main/webapp/WEB-INF/web.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
+         version="4.0">
+</web-app>

+ 436 - 0
JavaWeb03/servlet04_login/src/main/webapp/index.html

@@ -0,0 +1,436 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>书城首页</title>
+    <link rel="stylesheet" href="./static/css/minireset.css" />
+    <link rel="stylesheet" href="./static/css/common.css" />
+    <link rel="stylesheet" href="./static/css/iconfont.css" />
+    <link rel="stylesheet" href="./static/css/index.css" />
+    <link rel="stylesheet" href="./static/css/swiper.min.css" />
+  </head>
+  <body>
+    <div id="app">
+      <div class="topbar">
+        <div class="w">
+          <div class="topbar-left">
+            <i>送至:</i>
+            <i>北京</i>
+            <i class="iconfont icon-ai-arrow-down"></i>
+          </div>
+          <div class="topbar-right">
+            <a href="./pages/user/login.html" class="login">登录</a>
+            <a href="./pages/user/regist.html" class="register">注册</a>
+            <a
+              href="./pages/cart/cart.html"
+              class="cart iconfont icon-gouwuche
+			"
+            >
+              购物车
+              <div class="cart-num">3</div>
+            </a>
+            <a href="./pages/manager/book_manager.html" class="admin">后台管理</a>
+          </div>
+<!--          登录后风格-->
+<!--          <div class="topbar-right">-->
+<!--            <span>欢迎你<b>张总</b></span>-->
+<!--            <a href="#" class="register">注销</a>-->
+<!--            <a-->
+<!--                    href="pages/cart/cart.jsp"-->
+<!--                    class="cart iconfont icon-gouwuche-->
+<!--			">-->
+<!--              购物车-->
+<!--              <div class="cart-num">3</div>-->
+<!--            </a>-->
+<!--            <a href="./pages/manager/book_manager.html" class="admin">后台管理</a>-->
+<!--          </div>-->
+        </div>
+      </div>
+      <div class="header w">
+        <a href="#" class="header-logo"></a>
+        <div class="header-nav">
+          <ul>
+            <li><a href="#">java</a></li>
+            <li><a href="#">前端</a></li>
+            <li><a href="#">小说</a></li>
+            <li><a href="#">文学</a></li>
+            <li><a href="#">青春文学</a></li>
+            <li><a href="#">艺术</a></li>
+            <li><a href="#">管理</a></li>
+          </ul>
+        </div>
+        <div class="header-search">
+          <input type="text" placeholder="十万个为什么" />
+          <button class="iconfont icon-search"></button>
+        </div>
+      </div>
+      <div class="banner w clearfix">
+        <div class="banner-left">
+          <ul>
+            <li>
+              <a href="">
+                <span>文学 鉴赏</span>
+                <i class="iconfont icon-jiantou"></i
+              ></a>
+            </li>
+            <li>
+              <a href="">
+                <span>社科 研究</span>
+                <i class="iconfont icon-jiantou"></i
+              ></a>
+            </li>
+            <li>
+              <a href="">
+                <span>少儿 培训</span>
+                <i class="iconfont icon-jiantou"></i
+              ></a>
+            </li>
+            <li>
+              <a href="">
+                <span>艺术 赏析</span>
+                <i class="iconfont icon-jiantou"></i
+              ></a>
+            </li>
+            <li>
+              <a href="">
+                <span>生活 周边</span>
+                <i class="iconfont icon-jiantou"></i
+              ></a>
+            </li>
+            <li>
+              <a href="">
+                <span>文教 科技</span>
+                <i class="iconfont icon-jiantou"></i
+              ></a>
+            </li>
+            <li>
+              <a href="">
+                <span>热销 畅读</span>
+                <i class="iconfont icon-jiantou"></i
+              ></a>
+            </li>
+          </ul>
+        </div>
+        <div class="banner-right">
+          <div class="swiper-container">
+            <ul class="swiper-wrapper">
+              <li class="swiper-slide">
+                <img src="./static/uploads/banner4.jpg" alt="">
+                <!-- <div class="banner-img"></div> -->
+              </li>
+              <li class="swiper-slide">
+                <img src="./static/uploads/banner5.jpg" alt="">
+                <!-- <div class="banner-img"></div> -->
+              </li>
+              <li class="swiper-slide">
+                <img src="./static/uploads/banner6.jpg" alt="">
+                <!-- <div class="banner-img"></div> -->
+              </li>
+            </ul>
+            <div class="swiper-button-prev"></div>
+
+            <div class="swiper-button-next"></div>
+
+            <!-- Add Pagination -->
+            <div class="swiper-pagination"></div>
+          </div>
+        </div>
+      </div>
+      <div class="books-list ">
+        <div class="w">
+          <div class="list">
+            <div class="list-header">
+              <div class="title">图书列表</div>
+              <div class="price-search">
+                <span>价格:</span>
+                <input type="text">
+                <span>-元</span>
+                <input type="text">
+                <span>元</span>
+                <button>查询</button>
+              </div>
+            </div>
+            <div class="list-content">
+              <div class="list-item">
+                <img src="./static/uploads/huozhe.jpg" alt="">
+                <p>书名:活着</p>
+                <p>作者:余华</p>
+                <p>价格:¥66.6</p>
+                <p>销量:230</p>
+                <p>库存:1000</p>
+                <button>加入购物车</button>
+              </div>
+              <div href="" class="list-item">
+                <img src="./static/uploads/huranqiri.jpg" alt="">
+                <p>书名:活着</p>
+                <p>作者:余华</p>
+                <p>价格:¥66.6</p>
+                <p>销量:230</p>
+                <p>库存:1000</p>
+                <button>加入购物车</button>
+              </div>
+              <div href="" class="list-item">
+                <img src="./static/uploads/Javabianchengsixiang.jpg" alt="">
+                <p>书名:活着</p>
+                <p>作者:余华</p>
+                <p>价格:¥66.6</p>
+                <p>销量:230</p>
+                <p>库存:1000</p>
+                <button>加入购物车</button>
+              </div>
+              <div href="" class="list-item">
+                <img src="./static/uploads/jiaofu.jpg" alt="">
+                <p>书名:活着</p>
+                <p>作者:余华</p>
+                <p>价格:¥66.6</p>
+                <p>销量:230</p>
+                <p>库存:1000</p>
+                <button>加入购物车</button>
+              </div>
+              <div href="" class="list-item">
+                <img src="./static/uploads/jieyouzahuodian.jpg" alt="">
+                <p>书名:活着</p>
+                <p>作者:余华</p>
+                <p>价格:¥66.6</p>
+                <p>销量:230</p>
+                <p>库存:1000</p>
+                <button>加入购物车</button>
+              </div>
+              <div href="" class="list-item">
+                <img src="./static/uploads/kanjian.jpg" alt="">
+                <p>书名:活着</p>
+                <p>作者:余华</p>
+                <p>价格:¥66.6</p>
+                <p>销量:230</p>
+                <p>库存:1000</p>
+                <button>加入购物车</button>
+              </div>
+              <div href="" class="list-item">
+                <img src="./static/uploads/pinang.jpg" alt="">
+                <p>书名:活着</p>
+                <p>作者:余华</p>
+                <p>价格:¥66.6</p>
+                <p>销量:230</p>
+                <p>库存:1000</p>
+                <button>加入购物车</button>
+              </div>
+              <div href="" class="list-item">
+                <img src="./static/uploads/pingfandeshijie.jpg" alt="">
+                <p>书名:活着</p>
+                <p>作者:余华</p>
+                <p>价格:¥66.6</p>
+                <p>销量:230</p>
+                <p>库存:1000</p>
+                <button>加入购物车</button>
+              </div>
+              <div href="" class="list-item">
+                <img src="./static/uploads/qiadaohaochudexingfu.jpg" alt="">
+                <p>书名:活着</p>
+                <p>作者:余华</p>
+                <p>价格:¥66.6</p>
+                <p>销量:230</p>
+                <p>库存:1000</p>
+                <button>加入购物车</button>
+              </div>
+              <div href="" class="list-item">
+                <img src="./static/uploads/renyueshenhua.jpg" alt="">
+                <p>书名:活着</p>
+                <p>作者:余华</p>
+                <p>价格:¥66.6</p>
+                <p>销量:230</p>
+                <p>库存:1000</p>
+                <button>加入购物车</button>
+              </div>
+
+            </div>
+            <div class="list-footer">
+                <div>首页</div>
+                <div>上一页</div>
+                <ul><li class="active">1</li><li>2</li><li>3</li></ul>
+                <div>下一页</div>
+                <div>末页</div>
+                <span>共10页</span>
+                <span>30条记录</span>
+                <span>到第</span>
+                <input type="text">
+                <span>页</span>
+                <button>确定</button>
+            </div>
+          </div>
+        </div>
+       
+      </div>
+      <div class="cate w">
+        <div class="list">
+          <a href="" class="list-item">
+            <i class="iconfont icon-java"></i>
+            <span>java</span>
+          </a>
+          <a href="" class="list-item"
+            ><i class="iconfont icon-h5"></i>h5</a
+          >
+          <a href="" class="list-item">
+            <i class="iconfont icon-python"></i>python
+          </a>
+          <a href="" class="list-item"
+            ><i class="iconfont icon-tianchongxing-"></i>pm</a
+          >
+          <a href="" class="list-item"
+            ><i class="iconfont icon-php_elephant"></i>php</a
+          >
+          <a href="" class="list-item"
+            ><i class="iconfont icon-go"></i>go</a
+          >
+        </div>
+        <a href="" class="img">
+          <img src="./static/uploads/cate4.jpg" alt="" />
+        </a>
+        <a href="" class="img">
+          <img src="./static/uploads/cate5.jpg" alt="" />
+        </a>
+        <a href="" class="img">
+          <img src="./static/uploads/cate6.jpg" alt="" />
+        </a>
+      </div>
+      <div class="books">
+        <div class="w">
+          <div class="seckill">
+            <div class="seckill-header">
+              <div class="title">
+                图书秒杀
+              </div>
+              <!-- <i class="iconfont icon-huanyipi"></i> -->
+            </div>
+            <div class="seckill-content">
+             
+                  <a href="" class="tip"> 
+                     <h5>距离结束还有</h5>
+                     <i class="iconfont icon-shandian"></i>
+                     <div class="downcount">
+                      <span class="time">00</span>
+                      <span class="token">:</span>
+                      <span class="time">00</span>
+                      <span class="token">:</span>
+                      <span class="time">00</span>
+                     </div>
+                  </a>
+              
+              
+                  <a href="" class="books-sec">
+                    <img src="./static/uploads/congwanqingdaominguo.jpg" alt="">
+                    <p>从晚晴到民国</p>
+                    <div>
+                      <span class="cur-price">¥28.9</span>
+                      <span class="pre-price">¥36.5</span>
+                    </div>
+                    <button>立即购买</button>
+                  </a>
+                  <a href="" class="books-sec">
+                    <img src="./static/uploads/cyuyanrumenjingdian.jpg" alt="">
+                    <p>c语言入门经典</p>
+                    <div>
+                      <span class="cur-price">¥55.9</span>
+                      <span class="pre-price">¥68.5</span>
+                    </div>
+                    <button>立即购买</button>
+                  </a>
+                  <a href="" class="books-sec">
+                    <img src="./static/uploads/fusang.jpg" alt="">
+                    <p>扶桑</p>
+                    <div>
+                      <span class="cur-price">¥30.9</span>
+                      <span class="pre-price">¥47.5</span>
+                    </div>
+                    <button>立即购买</button>
+                  </a>
+                  <a href="" class="books-sec">
+                    <img src="./static/uploads/geihaizideshi.jpg" alt="">
+                    <p>给孩子的诗</p>
+                    <div>
+                      <span class="cur-price">¥18.9</span>
+                      <span class="pre-price">¥25.5</span>
+                    </div>
+                    <button>立即购买</button>
+                  </a>
+             
+           
+                 
+             
+              </ul>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="bottom">
+        <div class="w">
+          <div class="top">
+            <ul>
+              <li>
+                <a href="">
+                  <img src="./static/img/bottom1.png" alt="">
+                  <span>大咖级讲师亲自授课</span>
+                </a>
+              </li>
+              <li>
+                <a href="">
+                  <img src="./static/img/bottom.png" alt="">
+                  <span>课程为学员成长持续赋能</span>
+                </a>
+              </li>
+              <li>
+                <a href="">
+                  <img src="./static/img/bottom2.png" alt="">
+                  <span>学员真是情况大公开</span>
+                </a>
+              </li>
+            </ul>
+          </div>
+          <div class="content">
+            <dl>
+              <dt>关于愛摳訂</dt>
+              <dd>教育理念</dd>
+              <!-- <dd>名师团队</dd>
+              <dd>学员心声</dd> -->
+            </dl>
+            <dl>
+              <dt>资源下载</dt>
+              <dd>视频下载</dd>
+              <!-- <dd>资料下载</dd>
+              <dd>工具下载</dd> -->
+            </dl>
+            <dl>
+              <dt>加入我们</dt>
+              <dd>招聘岗位</dd>
+              <!-- <dd>岗位介绍</dd>
+              <dd>招贤纳师</dd> -->
+            </dl>
+            <dl>
+              <dt>联系我们</dt>
+              <dd>http://www.lovecoding.com<dd>
+            </dl>
+          </div>
+        </div>
+        <div class="down">
+          愛摳訂书城.Copyright ©2015
+        </div>
+      </div>
+     
+
+    </div>
+    <script src="./static/script/swiper.min.js"></script>
+    <script>
+      var swiper = new Swiper('.swiper-container', {
+        autoplay: true,
+        pagination: {
+          el: '.swiper-pagination',
+          dynamicBullets: true
+        },
+        navigation: {
+          nextEl: '.swiper-button-next',
+          prevEl: '.swiper-button-prev'
+        }
+      })
+    </script>
+  </body>
+</html>

+ 193 - 0
JavaWeb03/servlet04_login/src/main/webapp/pages/cart/cart.html

@@ -0,0 +1,193 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Document</title>
+    <link rel="stylesheet" href="../../static/css/minireset.css" />
+    <link rel="stylesheet" href="../../static/css/common.css" />
+    <link rel="stylesheet" href="../../static/css/cart.css" />
+  </head>
+  <body>
+    <div class="header">
+      <div class="w">
+        <div class="header-left">
+          <a href="../../index.html">
+            <img src="../../static/img/logo.gif" alt=""
+          /></a>
+          <h1>我的购物车</h1>
+        </div>
+        <div class="header-right">
+          <h3>欢迎<span>张总</span>光临愛摳訂书城</h3>
+          <div class="order"><a href="../order/order.html">我的订单</a></div>
+          <div class="destory"><a href="../../index.html">注销</a></div>
+          <div class="gohome">
+            <a href="../../index.html">返回</a>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="list">
+      <div class="w">
+        <table>
+          <thead>
+            <tr>
+              <th>图片</th>
+              <th>商品名称</th>
+
+              <th>数量</th>
+              <th>单价</th>
+              <th>金额</th>
+              <th>操作</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>
+                <img src="../../static/uploads/huozhe.jpg" alt="" />
+              </td>
+              <td>活着</td>
+              <td>
+                <span class="count">-</span>
+                <input class="count-num" type="text" value="1" />
+                <span class="count">+</span>
+              </td>
+              <td>36.8</td>
+              <td>36.8</td>
+              <td><a href="">删除</a></td>
+            </tr>
+            <tr>
+              <td>
+                <img src="../../static/uploads/kanjian.jpg" alt="" />
+              </td>
+              <td>看见</td>
+              <td>
+                <span class="count">-</span>
+                <input class="count-num" type="text" value="1" />
+                <span class="count">+</span>
+              </td>
+              <td>40.1</td>
+              <td>40.1</td>
+              <td><a href="">删除</a></td>
+            </tr>
+            <tr>
+              <td>
+                <img src="../../static/uploads/kanjian.jpg" alt="" />
+              </td>
+              <td>
+                假如书名太长了,只展示一部分书名.自动展示省略号
+              </td>
+              <td>
+                <span class="count">-</span>
+                <input class="count-num" type="text" value="1" />
+                <span class="count">+</span>
+              </td>
+              <td>40.1</td>
+              <td>40.1</td>
+              <td><a href="">删除</a></td>
+            </tr>
+            <tr>
+              <td>
+                <img src="../../static/uploads/kanjian.jpg" alt="" />
+              </td>
+              <td>
+                假如书名太长了,只展示一部分书名.自动展示省略号
+              </td>
+              <td>
+                <!-- <div> -->
+                <span class="count">-</span>
+                <input class="count-num" type="text" value="100" />
+                <span class="count">+</span>
+                <!-- </div> -->
+              </td>
+              <td>40.1</td>
+              <td>40.1</td>
+              <td><a href="">删除</a></td>
+            </tr>
+            <tr>
+              <td>
+                <img src="../../static/uploads/kanjian.jpg" alt="" />
+              </td>
+              <td>
+                假如书名太长了,只展示一部分书名.自动展示省略号
+              </td>
+              <td>
+                <span class="count">-</span>
+                <input class="count-num" type="text" value="99" />
+                <span class="count">+</span>
+              </td>
+              <td>40.1</td>
+              <td>40.1</td>
+              <td><a href="">删除</a></td>
+            </tr>
+          </tbody>
+        </table>
+        <div class="footer">
+          <div class="footer-left">
+            <a href="#" class="clear-cart">清空购物车</a>
+            <a href="#">继续购物</a>
+          </div>
+          <div class="footer-right">
+            <div>共<span>3</span>件商品</div>
+            <div class="total-price">总金额<span>99.9</span>元</div>
+            <a class="pay" href="checkout.html">去结账</a>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="bottom">
+      <div class="w">
+        <div class="top">
+          <ul>
+            <li>
+              <a href="">
+                <img src="../../static/img/bottom1.png" alt="" />
+                <span>大咖级讲师亲自授课</span>
+              </a>
+            </li>
+            <li>
+              <a href="">
+                <img src="../../static/img/bottom.png" alt="" />
+                <span>课程为学员成长持续赋能</span>
+              </a>
+            </li>
+            <li>
+              <a href="">
+                <img src="../../static/img/bottom2.png" alt="" />
+                <span>学员真是情况大公开</span>
+              </a>
+            </li>
+          </ul>
+        </div>
+        <div class="content">
+          <dl>
+            <dt>关于愛摳訂</dt>
+            <dd>教育理念</dd>
+            <!-- <dd>名师团队</dd>
+            <dd>学员心声</dd> -->
+          </dl>
+          <dl>
+            <dt>资源下载</dt>
+            <dd>视频下载</dd>
+            <!-- <dd>资料下载</dd>
+            <dd>工具下载</dd> -->
+          </dl>
+          <dl>
+            <dt>加入我们</dt>
+            <dd>招聘岗位</dd>
+            <!-- <dd>岗位介绍</dd>
+            <dd>招贤纳师</dd> -->
+          </dl>
+          <dl>
+            <dt>联系我们</dt>
+            <dd>http://www.lovecoding.com</dd>
+            <dd></dd>
+          </dl>
+        </div>
+      </div>
+      <div class="down">
+        愛摳訂书城.Copyright ©2015
+      </div>
+    </div>
+  </body>
+</html>

+ 63 - 0
JavaWeb03/servlet04_login/src/main/webapp/pages/cart/checkout.html

@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>结算页面</title>
+<link type="text/css" rel="stylesheet" href="../../static/css/style.css" >
+	<link rel="stylesheet" href="../../static/css/minireset.css" />
+	<link rel="stylesheet" href="../../static/css/common.css" />
+	<link rel="stylesheet" href="../../static/css/cart.css" />
+<style type="text/css">
+	h1 {
+		text-align: center;
+		margin-top: 200px;
+		font-size: 26px;
+	}
+	.oid{
+		color: red;
+		font-weight: bolder;
+	}
+</style>
+</head>
+<body>
+	
+<!--	<div id="header">-->
+<!--			<img class="logo_img" alt="" src="../../static/img/logo.gif" >-->
+<!--			<span class="wel_word">结算</span>-->
+<!--			<div>-->
+<!--				<span>欢迎<span class="um_span">张总</span>光临愛摳訂书城</span>-->
+<!--				<a href="../order/order.html">我的订单</a>-->
+<!--				<a href="../../index.html">注销</a>&nbsp;&nbsp;-->
+<!--				<a href="../../index.html">返回</a>-->
+<!--			</div>-->
+<!--	</div>-->
+		<div class="header">
+			<div class="w">
+				<div class="header-left">
+					<a href="../../index.html">
+						<img src="../../static/img/logo.gif" alt=""
+						/></a>
+					<span>我的购物车</span>
+				</div>
+				<div class="header-right">
+					<h3>欢迎<span>张总</span>光临愛摳訂书城</h3>
+					<div class="order"><a href="../order/order.html">我的订单</a></div>
+					<div class="destory"><a href="../../index.html">注销</a></div>
+					<div class="gohome">
+						<a href="../../index.html">返回</a>
+					</div>
+				</div>
+			</div>
+		</div>
+	
+	<div id="main">
+		<h1>你的订单已结算,订单号为:<span class="oid">546845626455846</span></h1>
+	</div>
+
+	<div id="bottom">
+		<span>
+			愛摳訂书城.Copyright &copy;2015
+		</span>
+	</div>
+</body>
+</html>

+ 80 - 0
JavaWeb03/servlet04_login/src/main/webapp/pages/manager/book_add.html

@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Document</title>
+    <link rel="stylesheet" href="../../static/css/minireset.css" />
+    <link rel="stylesheet" href="../../static/css/common.css" />
+    <link rel="stylesheet" href="../../static/css/style.css" />
+    <link rel="stylesheet" href="../../static/css/cart.css" />
+    <link rel="stylesheet" href="../../static/css/bookManger.css" />
+    <link rel="stylesheet" href="../../static/css/register.css" />
+    <link rel="stylesheet" href="../../static/css/book_edit.css" />
+  </head>
+  <body>
+    <div class="header">
+      <div class="w">
+        <div class="header-left">
+          <a href="../../index.html">
+            <img src="../../static/img/logo.gif" alt=""
+          /></a>
+          <h1>添加图书</h1>
+        </div>
+        <div class="header-right">
+          <a href="./book_manager.html" class="order">图书管理</a>
+          <a href="./order_manager.html" class="destory">订单管理</a>
+          <a href="../../index.html" class="gohome">返回商城</a>
+        </div>
+      </div>
+    </div>
+    <div class="login_banner">
+      <div class="register_form">
+        <form action="">
+          <div class="form-item">
+            <div>
+              <label>名称:</label>
+              <input type="text" placeholder="请输入名称" />
+            </div>
+            <span class="errMess" style="visibility: visible;"
+              >请输入正确的名称</span
+            >
+          </div>
+          <div class="form-item">
+            <div>
+              <label>价格:</label>
+              <input type="number" placeholder="请输入价格" />
+            </div>
+            <span class="errMess">请输入正确数字</span>
+          </div>
+          <div class="form-item">
+            <div>
+              <label>作者:</label>
+              <input type="text" placeholder="请输入作者" />
+            </div>
+            <span class="errMess">请输入正确作者</span>
+          </div>
+          <div class="form-item">
+            <div>
+              <label>销量:</label>
+              <input type="number" placeholder="请输入销量" />
+            </div>
+            <span class="errMess">请输入正确销量</span>
+          </div>
+          <div class="form-item">
+            <div>
+              <label>库存:</label>
+              <input type="number" placeholder="请输入库存" />
+            </div>
+            <span class="errMess">请输入正确库存</span>
+          </div>
+
+          <button class="btn">提交</button>
+        </form>
+      </div>
+    </div>
+    <div class="bottom">
+      愛摳訂书城.Copyright ©2015
+    </div>
+  </body>
+</html>

+ 80 - 0
JavaWeb03/servlet04_login/src/main/webapp/pages/manager/book_edit.html

@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Document</title>
+    <link rel="stylesheet" href="../../static/css/minireset.css" />
+    <link rel="stylesheet" href="../../static/css/common.css" />
+    <link rel="stylesheet" href="../../static/css/style.css" />
+    <link rel="stylesheet" href="../../static/css/cart.css" />
+    <link rel="stylesheet" href="../../static/css/bookManger.css" />
+    <link rel="stylesheet" href="../../static/css/register.css" />
+    <link rel="stylesheet" href="../../static/css/book_edit.css" />
+  </head>
+  <body>
+    <div class="header">
+      <div class="w">
+        <div class="header-left">
+          <a href="../../index.html">
+            <img src="../../static/img/logo.gif" alt=""
+          /></a>
+          <h1>编辑图书</h1>
+        </div>
+        <div class="header-right">
+          <a href="./book_manager.html" class="order">图书管理</a>
+          <a href="./order_manager.html" class="destory">订单管理</a>
+          <a href="../../index.html" class="gohome">返回商城</a>
+        </div>
+      </div>
+    </div>
+    <div class="login_banner">
+      <div class="register_form">
+        <form action="">
+          <div class="form-item">
+            <div>
+              <label>名称:</label>
+              <input type="text" placeholder="请输入名称" />
+            </div>
+            <span class="errMess" style="visibility: visible;"
+              >请输入正确的名称</span
+            >
+          </div>
+          <div class="form-item">
+            <div>
+              <label>价格:</label>
+              <input type="number" placeholder="请输入价格" />
+            </div>
+            <span class="errMess">请输入正确数字</span>
+          </div>
+          <div class="form-item">
+            <div>
+              <label>作者:</label>
+              <input type="text" placeholder="请输入作者" />
+            </div>
+            <span class="errMess">请输入正确作者</span>
+          </div>
+          <div class="form-item">
+            <div>
+              <label>销量:</label>
+              <input type="number" placeholder="请输入销量" />
+            </div>
+            <span class="errMess">请输入正确销量</span>
+          </div>
+          <div class="form-item">
+            <div>
+              <label>库存:</label>
+              <input type="number" placeholder="请输入库存" />
+            </div>
+            <span class="errMess">请输入正确库存</span>
+          </div>
+
+          <button class="btn">提交</button>
+        </form>
+      </div>
+    </div>
+    <div class="bottom">
+      愛摳訂书城.Copyright ©2015
+    </div>
+  </body>
+</html>

+ 154 - 0
JavaWeb03/servlet04_login/src/main/webapp/pages/manager/book_manager.html

@@ -0,0 +1,154 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Document</title>
+    <link rel="stylesheet" href="../../static/css/minireset.css" />
+    <link rel="stylesheet" href="../../static/css/common.css" />
+    <link rel="stylesheet" href="../../static/css/cart.css" />
+    <link rel="stylesheet" href="../../static/css/bookManger.css" />
+  </head>
+  <body>
+    <div class="header">
+      <div class="w">
+        <div class="header-left">
+          <a href="../../index.html">
+            <img src="../../static/img/logo.gif" alt=""
+          /></a>
+          <h1>图书管理系统</h1>
+        </div>
+        <div class="header-right">
+          <a href="#" class="order">图书管理</a>
+          <a href="./order_manager.html" class="destory">订单管理</a>
+          <a href="../../index.html" class="gohome">返回商城</a>
+        </div>
+      </div>
+    </div>
+    <div class="list">
+      <div class="w">
+        <div class="add">
+          <a href="book_edit.html">添加图书</a>
+        </div>
+        <table>
+          <thead>
+            <tr>
+              <th>图片</th>
+              <th>商品名称</th>
+              <th>价格</th>
+              <th>作者</th>
+              <th>销量</th>
+              <th>库存</th>
+              <th>操作</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>
+                <img src="../../static/uploads/huozhe.jpg" alt="" />
+              </td>
+              <td>活着</td>
+              <td>
+                100.00
+              </td>
+              <td>余华</td>
+              <td>200</td>
+              <td>400</td>
+              <td>
+                <a href="book_edit.html">修改</a><a href="" class="del">删除</a>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <img src="../../static/uploads/huozhe.jpg" alt="" />
+              </td>
+              <td>活着</td>
+              <td>
+                100.00
+              </td>
+              <td>余华</td>
+              <td>200</td>
+              <td>400</td>
+              <td>
+                <a href="book_edit.html">修改</a><a href="" class="del">删除</a>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+        <div class="footer">
+          <div class="footer-right">
+            <div>首页</div>
+            <div>上一页</div>
+            <ul>
+              <li class="active">1</li>
+              <li>2</li>
+              <li>3</li>
+            </ul>
+            <div>下一页</div>
+            <div>末页</div>
+            <span>共10页</span>
+            <span>30条记录</span>
+            <span>到第</span>
+            <input type="text" />
+            <span>页</span>
+            <button>确定</button>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="bottom">
+      <div class="w">
+        <div class="top">
+          <ul>
+            <li>
+              <a href="">
+                <img src="../../static/img/bottom1.png" alt="" />
+                <span>大咖级讲师亲自授课</span>
+              </a>
+            </li>
+            <li>
+              <a href="">
+                <img src="../../static/img/bottom.png" alt="" />
+                <span>课程为学员成长持续赋能</span>
+              </a>
+            </li>
+            <li>
+              <a href="">
+                <img src="../../static/img/bottom2.png" alt="" />
+                <span>学员真是情况大公开</span>
+              </a>
+            </li>
+          </ul>
+        </div>
+        <div class="content">
+          <dl>
+            <dt>关于愛摳訂</dt>
+            <dd>教育理念</dd>
+            <!-- <dd>名师团队</dd>
+            <dd>学员心声</dd> -->
+          </dl>
+          <dl>
+            <dt>资源下载</dt>
+            <dd>视频下载</dd>
+            <!-- <dd>资料下载</dd>
+            <dd>工具下载</dd> -->
+          </dl>
+          <dl>
+            <dt>加入我们</dt>
+            <dd>招聘岗位</dd>
+            <!-- <dd>岗位介绍</dd>
+            <dd>招贤纳师</dd> -->
+          </dl>
+          <dl>
+            <dt>联系我们</dt>
+            <dd>http://www.lovecoding.com</dd>
+            <dd></dd>
+          </dl>
+        </div>
+      </div>
+      <div class="down">
+        愛摳訂书城.Copyright ©2015
+      </div>
+    </div>
+  </body>
+</html>

+ 36 - 0
JavaWeb03/servlet04_login/src/main/webapp/pages/manager/manager.html

@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>后台管理</title>
+<link type="text/css" rel="stylesheet" href="../../static/css/style.css" >
+<style type="text/css">
+	h1 {
+		text-align: center;
+		margin-top: 200px;
+	}
+</style>
+</head>
+<body>
+	
+	<div id="header">
+			<img class="logo_img" alt="" src="../../static/img/logo.gif" >
+			<span class="wel_word">后台管理系统</span>
+			<div>
+				<a href="book_manager.html">图书管理</a>
+				<a href="order_manager.html">订单管理</a>
+				<a href="../../index.html">返回商城</a>
+			</div>
+	</div>
+	
+	<div id="main">
+		<h1>欢迎管理员进入后台管理系统</h1>
+	</div>
+	
+	<div id="bottom">
+		<span>
+			愛摳訂书城.Copyright &copy;2015
+		</span>
+	</div>
+</body>
+</html>

+ 151 - 0
JavaWeb03/servlet04_login/src/main/webapp/pages/manager/order_manager.html

@@ -0,0 +1,151 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Document</title>
+    <link rel="stylesheet" href="../../static/css/minireset.css" />
+    <link rel="stylesheet" href="../../static/css/common.css" />
+    <link rel="stylesheet" href="../../static/css/cart.css" />
+    <link rel="stylesheet" href="../../static/css/bookManger.css" />
+    <link rel="stylesheet" href="../../static/css/orderManger.css" />
+  </head>
+  <body>
+    <div class="header">
+      <div class="w">
+        <div class="header-left">
+          <a href="../../index.html">
+            <img src="../../static/img/logo.gif" alt=""
+          /></a>
+          <h1>订单管理系统</h1>
+        </div>
+        <div class="header-right">
+          <a href="./book_manager.html" class="order">图书管理</a>
+          <a href="#" class="destory">订单管理</a>
+          <a href="../../index.html" class="gohome">返回商城</a>
+        </div>
+      </div>
+    </div>
+    <div class="list">
+      <div class="w">
+        <table>
+          <thead>
+            <tr>
+              <th>订单号</th>
+              <th>订单日期</th>
+              <th>订单金额</th>
+              <th>订单数量</th>
+              <th>订单详情</th>
+              <th>发货状态</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>12354456895</td>
+              <td>
+                2015.04.23
+              </td>
+              <td>90.00</td>
+              <td>88</td>
+              <td><a href="">查看详情</a></td>
+              <td><a href="" class="send">等待发货</a></td>
+            </tr>
+            <tr>
+              <td>12354456895</td>
+              <td>
+                2015.04.23
+              </td>
+              <td>90.00</td>
+              <td>88</td>
+              <td><a href="">查看详情</a></td>
+              <td><a href="" class="send">已发货</a></td>
+            </tr>
+            <tr>
+              <td>12354456895</td>
+              <td>
+                2015.04.23
+              </td>
+              <td>90.00</td>
+              <td>88</td>
+              <td><a href="">查看详情</a></td>
+              <td><a href="">点击发货</a></td>
+            </tr>
+          </tbody>
+        </table>
+        <div class="footer">
+          <div class="footer-right">
+            <div>首页</div>
+            <div>上一页</div>
+            <ul>
+              <li class="active">1</li>
+              <li>2</li>
+              <li>3</li>
+            </ul>
+            <div>下一页</div>
+            <div>末页</div>
+            <span>共10页</span>
+            <span>30条记录</span>
+            <span>到第</span>
+            <input type="text" />
+            <span>页</span>
+            <button>确定</button>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="bottom">
+      <div class="w">
+        <div class="top">
+          <ul>
+            <li>
+              <a href="">
+                <img src="../../static/img/bottom1.png" alt="" />
+                <span>大咖级讲师亲自授课</span>
+              </a>
+            </li>
+            <li>
+              <a href="">
+                <img src="../../static/img/bottom.png" alt="" />
+                <span>课程为学员成长持续赋能</span>
+              </a>
+            </li>
+            <li>
+              <a href="">
+                <img src="../../static/img/bottom2.png" alt="" />
+                <span>学员真是情况大公开</span>
+              </a>
+            </li>
+          </ul>
+        </div>
+        <div class="content">
+          <dl>
+            <dt>关于愛摳訂</dt>
+            <dd>教育理念</dd>
+            <!-- <dd>名师团队</dd>
+            <dd>学员心声</dd> -->
+          </dl>
+          <dl>
+            <dt>资源下载</dt>
+            <dd>视频下载</dd>
+            <!-- <dd>资料下载</dd>
+            <dd>工具下载</dd> -->
+          </dl>
+          <dl>
+            <dt>加入我们</dt>
+            <dd>招聘岗位</dd>
+            <!-- <dd>岗位介绍</dd>
+            <dd>招贤纳师</dd> -->
+          </dl>
+          <dl>
+            <dt>联系我们</dt>
+            <dd>http://www.lovecoding.com</dd>
+            <dd></dd>
+          </dl>
+        </div>
+      </div>
+      <div class="down">
+        愛摳訂书城.Copyright ©2015
+      </div>
+    </div>
+  </body>
+</html>

+ 154 - 0
JavaWeb03/servlet04_login/src/main/webapp/pages/order/order.html

@@ -0,0 +1,154 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>我的订单</title>
+    <link rel="stylesheet" href="../../static/css/minireset.css" />
+    <link rel="stylesheet" href="../../static/css/common.css" />
+    <link rel="stylesheet" href="../../static/css/cart.css" />
+    <link rel="stylesheet" href="../../static/css/bookManger.css" />
+    <link rel="stylesheet" href="../../static/css/orderManger.css" />
+  </head>
+  <body>
+    <div class="header">
+      <div class="w">
+        <div class="header-left">
+          <a href="../../index.html">
+            <img src="../../static/img/logo.gif" alt=""
+          /></a>
+          <h1>我的订单</h1>
+        </div>
+        <div class="header-right">
+          <h3>欢迎<span>张总</span>光临愛摳訂书城</h3>
+          <div class="order"><a href="../order/order.html">我的订单</a></div>
+          <div class="destory"><a href="../../index.html">注销</a></div>
+          <div class="gohome">
+            <a href="../../index.html">返回</a>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="list">
+      <div class="w">
+        <table>
+          <thead>
+            <tr>
+              <th>订单号</th>
+              <th>订单日期</th>
+              <th>订单金额</th>
+              <th>订单数量</th>
+              <th>订单状态</th>
+              <th>订单详情</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>12354456895</td>
+              <td>
+                2015.04.23
+              </td>
+              <td>90.00</td>
+              <td>88</td>
+              <td><a href="" class="send">等待发货</a></td>
+              <td><a href="">查看详情</a></td>
+            </tr>
+            <tr>
+              <td>12354456895</td>
+              <td>
+                2015.04.23
+              </td>
+              <td>90.00</td>
+              <td>88</td>
+              <td><a href="" class="send">未发货</a></td>
+              <td><a href="">查看详情</a></td>
+            </tr>
+            <tr>
+              <td>12354456895</td>
+              <td>
+                2015.04.23
+              </td>
+              <td>90.00</td>
+              <td>88</td>
+              <td><a href="" class="send">已发货</a></td>
+              <td><a href="">查看详情</a></td>
+            </tr>
+          </tbody>
+        </table>
+        <div class="footer">
+          <div class="footer-right">
+            <div>首页</div>
+            <div>上一页</div>
+            <ul>
+              <li class="active">1</li>
+              <li>2</li>
+              <li>3</li>
+            </ul>
+            <div>下一页</div>
+            <div>末页</div>
+            <span>共10页</span>
+            <span>30条记录</span>
+            <span>到第</span>
+            <input type="text" />
+            <span>页</span>
+            <button>确定</button>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="bottom">
+      <div class="w">
+        <div class="top">
+          <ul>
+            <li>
+              <a href="">
+                <img src="../../static/img/bottom1.png" alt="" />
+                <span>大咖级讲师亲自授课</span>
+              </a>
+            </li>
+            <li>
+              <a href="">
+                <img src="../../static/img/bottom.png" alt="" />
+                <span>课程为学员成长持续赋能</span>
+              </a>
+            </li>
+            <li>
+              <a href="">
+                <img src="../../static/img/bottom2.png" alt="" />
+                <span>学员真是情况大公开</span>
+              </a>
+            </li>
+          </ul>
+        </div>
+        <div class="content">
+          <dl>
+            <dt>关于愛摳訂</dt>
+            <dd>教育理念</dd>
+            <!-- <dd>名师团队</dd>
+            <dd>学员心声</dd> -->
+          </dl>
+          <dl>
+            <dt>资源下载</dt>
+            <dd>视频下载</dd>
+            <!-- <dd>资料下载</dd>
+            <dd>工具下载</dd> -->
+          </dl>
+          <dl>
+            <dt>加入我们</dt>
+            <dd>招聘岗位</dd>
+            <!-- <dd>岗位介绍</dd>
+            <dd>招贤纳师</dd> -->
+          </dl>
+          <dl>
+            <dt>联系我们</dt>
+            <dd>http://www.lovecoding.com</dd>
+            <dd></dd>
+          </dl>
+        </div>
+      </div>
+      <div class="down">
+        愛摳訂书城.Copyright ©2015
+      </div>
+    </div>
+  </body>
+</html>

+ 101 - 0
JavaWeb03/servlet04_login/src/main/webapp/pages/user/login.html

@@ -0,0 +1,101 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <base href="/bookstore/">
+  <meta charset="UTF-8" />
+  <title>爱扣钉会员登录页面</title>
+  <link type="text/css" rel="stylesheet" href="static/css/style.css" />
+  <script src="static/script/vue.js"></script>
+</head>
+<body>
+<div id="app">
+  <div id="login_header">
+    <a href="index.html">
+      <img class="logo_img" alt="" src="static/img/logo.gif" />
+    </a>
+  </div>
+
+  <div class="login_banner">
+    <div id="l_content">
+      <span class="login_word">欢迎登录</span>
+    </div>
+
+    <div id="content">
+      <div class="login_form">
+        <div class="login_box">
+          <div class="tit">
+            <h1>爱扣钉会员</h1>
+          </div>
+          <div class="msg_cont">
+            <b></b>
+            <span class="errorMsg">{{errMsg}}</span>
+          </div>
+          <div class="form">
+            <form method="post" action="login" @submit="checkLogin">
+              <label>用户名称:</label>
+              <input
+                      class="itxt"
+                      type="text"
+                      placeholder="请输入用户名"
+                      autocomplete="off"
+                      tabindex="1"
+                      name="username"
+                      id="username"
+                      v-model="username"
+              />
+              <br />
+              <br />
+              <label>用户密码:</label>
+              <input
+                      class="itxt"
+                      type="password"
+                      placeholder="请输入密码"
+                      autocomplete="off"
+                      tabindex="1"
+                      name="password"
+                      id="password"
+                      v-model.trim="password"
+              />
+              <br />
+              <br />
+              <input type="submit" value="登录" id="sub_btn" />
+            </form>
+            <div class="tit">
+              <a href="pages/user/regist.html">立即注册</a>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+  <div id="bottom">
+      <span>
+        爱扣钉书城.Copyright &copy;2015
+      </span>
+  </div>
+</div>
+<script>
+  new Vue({
+    "el":"#app",
+    "data":{
+      "username":"",
+      "password":"",
+      "errMsg":"请输入用户名和密码"
+    },
+    "methods":{
+      checkLogin(){
+        if(this.username==""){
+          this.errMsg = "用户名不能为空";
+          event.preventDefault();
+          return;
+        }
+        if(this.password==""){
+          this.errMsg="密码不能为空";
+          event.preventDefault();
+        }
+      }
+    }
+  });
+</script>
+</body>
+</html>

+ 43 - 0
JavaWeb03/servlet04_login/src/main/webapp/pages/user/login_success.html

@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>愛摳訂会员注册页面</title>
+<link type="text/css" rel="stylesheet" href="../../static/css/style.css" >
+<style type="text/css">
+	h1 {
+		text-align: center;
+		margin-top: 200px;
+	}
+	
+	h1 a {
+		color:red;
+	}
+</style>
+</head>
+<body>
+		<div id="header">
+				<a href="../../index.html">
+					<img class="logo_img" alt="" src="../../static/img/logo.gif" />
+				</a>
+				<div>
+					<span>欢迎<span class="um_span">张总</span>光临愛摳訂书城</span>
+					<a href="../order/order.html">我的订单</a>
+					<a href="../../index.html">注销</a>&nbsp;&nbsp;
+					<a href="../../index.html">返回</a>
+				</div>
+		</div>
+		
+		<div id="main">
+		
+			<h1>欢迎回来 <a href="../../index.html">转到主页</a></h1>
+	
+		</div>
+		
+		<div id="bottom">
+			<span>
+				愛摳訂书城.Copyright &copy;2015
+			</span>
+		</div>
+</body>
+</html>

+ 151 - 0
JavaWeb03/servlet04_login/src/main/webapp/pages/user/regist.html

@@ -0,0 +1,151 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <base href="/bookstore/">
+  <meta charset="UTF-8" />
+  <title>爱扣钉会员注册页面</title>
+  <link type="text/css" rel="stylesheet" href="static/css/style.css" />
+  <link rel="stylesheet" href="static/css/register.css" />
+  <style type="text/css">
+    .login_form {
+      height: 420px;
+      margin-top: 25px;
+    }
+  </style>
+  <script src="static/script/vue.js"></script>
+</head>
+<body>
+<div id="app">
+  <div id="login_header">
+    <a href="index.html">
+      <img class="logo_img" alt="" src="static/img/logo.gif" />
+    </a>
+  </div>
+
+  <div class="login_banner">
+    <div class="register_form">
+      <h1>注册爱扣钉会员</h1>
+      <form action="regist" @submit="checkAll">
+        <div class="form-item">
+          <div>
+            <label>用户名称:</label>
+            <input type="text" placeholder="请输入用户名" name="username" v-model="username" @blur="checkUsername"/>
+          </div>
+          <span class="errMess" :style="usernameCss">{{usernameErrMsg}}</span>
+        </div>
+        <div class="form-item">
+          <div>
+            <label>用户密码:</label>
+            <input type="password" placeholder="请输入密码" name="password" v-model="password" @blur="checkPassword"/>
+          </div>
+          <span class="errMess" :style="passwordCss">{{passwordErrMsg}}</span>
+        </div>
+        <div class="form-item">
+          <div>
+            <label>确认密码:</label>
+            <input type="password" placeholder="请输入确认密码" v-model="confirmPassword" @blur="checkConfirmPassword"/>
+          </div>
+          <span class="errMess" :style="confirmPasswordCss">{{confirmPasswordErrMsg}}</span>
+        </div>
+        <div class="form-item">
+          <div>
+            <label>用户邮箱:</label>
+            <input type="text" placeholder="请输入邮箱" name="email" v-model="email" @blur="checkEmail"/>
+          </div>
+          <span class="errMess" :style="emailCss">{{emailErrMsg}}</span>
+        </div>
+        <div class="form-item">
+          <div>
+            <label>验证码:</label>
+            <div class="verify">
+              <input type="text" placeholder="" />
+              <img src="static/img/code.bmp" alt="" />
+            </div>
+          </div>
+          <span class="errMess"></span>
+        </div>
+        <button class="btn">注册</button>
+      </form>
+    </div>
+  </div>
+  <div id="bottom">
+      <span>
+        爱扣钉书城.Copyright &copy;2015
+      </span>
+  </div>
+</div>
+<script>
+  new Vue({
+    "el":"#app",
+    "data":{
+      "username":"",
+      "usernameErrMsg":"用户名应为6~16位数组和字母组成",
+      "usernameCss":{"visibility":"hidden"},
+      "password":"",
+      "passwordErrMsg":"密码的长度至少为8位",
+      "passwordCss":{"visibility":"hidden"},
+      "confirmPassword":"",
+      "confirmPasswordErrMsg":"密码两次输入不一致",
+      "confirmPasswordCss":{"visibility":"hidden"},
+      "email":"",
+      "emailErrMsg":"请输入正确的邮箱格式",
+      "emailCss":{"visibility":"hidden"},
+    },
+    "methods":{
+      checkUsername(){
+        this.usernameCss={"visibility":"visible"}
+        var reg=/^[a-zA-Z0-9]{6,16}$/;
+        if(reg.test(this.username)){
+          this.usernameErrMsg="√";
+          return true;
+        }else{
+          this.usernameErrMsg="用户名应为6~16位数组和字母组成"
+          return false;
+        }
+      },
+      checkPassword(){
+        this.passwordCss={"visibility":"visible"};
+        var reg=/^[a-zA-Z0-9]{8,}$/;
+        if(reg.test(this.password)){
+          this.passwordErrMsg="√";
+          return true;
+        }else{
+          this.passwordErrMsg="密码的长度至少为8位";
+          return false;
+        }
+      },
+      checkConfirmPassword(){
+        this.confirmPasswordCss={"visibility":"visible"};
+        if(this.confirmPassword==""){
+          this.confirmPasswordErrMsg="密码两次输入不一致";
+          return false;
+        }
+        if(this.password==this.confirmPassword){
+          this.confirmPasswordErrMsg="√";
+          return true;
+        }else{
+          this.confirmPasswordErrMsg="密码两次输入不一致";
+          return false;
+        }
+      },
+      checkEmail(){
+        this.emailCss={"visibility":"visible"};
+        var reg=/^[a-zA-Z0-9_\.-]+@([a-zA-Z0-9-]+[\.]{1})+[a-zA-Z]+$/;
+        if(reg.test(this.email)){
+          this.emailErrMsg="√"
+          return true;
+        }else{
+          this.emailErrMsg="请输入正确的邮箱格式"
+          return false;
+        }
+      },
+      checkAll(){
+        if(!(this.checkUsername()&this.checkPassword()&this.checkConfirmPassword()&this.checkEmail())){
+          event.preventDefault()
+        }
+      }
+    }
+  })
+</script>
+</body>
+</html>

+ 39 - 0
JavaWeb03/servlet04_login/src/main/webapp/pages/user/regist_success.html

@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>愛摳訂会员注册页面</title>
+<link type="text/css" rel="stylesheet" href="../../static/css/style.css" >
+<style type="text/css">
+	h1 {
+		text-align: center;
+		margin-top: 200px;
+	}
+	h1 a {
+		color:red;
+	}
+</style>
+</head>
+<body>
+	<div id="header">
+		<a href="../../index.html">
+			<img class="logo_img" alt="" src="../../static/img/logo.gif" />
+		</a>
+		<span class="wel_word"></span>
+		<div>
+			<span>欢迎<span class="um_span">张总</span>光临愛摳訂书城</span>
+			<a href="../order/order.html">我的订单</a>
+			<a href="../../index.html">注销</a>&nbsp;&nbsp;
+			<a href="../../index.html">返回</a>
+		</div>
+	</div>
+	<div id="main">
+		<h1>注册成功! <a href="../../index.html">转到主页</a></h1>
+	</div>
+	<div id="bottom">
+		<span>
+			愛摳訂书城.Copyright &copy;2015
+		</span>
+	</div>
+</body>
+</html>

+ 87 - 0
JavaWeb03/servlet04_login/src/main/webapp/static/css/bookManger.css

@@ -0,0 +1,87 @@
+.header-right a {
+  font-size: 20px;
+  color: #e77e11;
+}
+.list input {
+  text-align: center;
+}
+.list .add {
+  padding: 10px 0;
+}
+.list .add a {
+  width: 80px;
+  height: 30px;
+  background-color: #e77e11;
+  color: #fff;
+  border: none;
+  outline: none;
+  text-align: center;
+  line-height: 30px;
+}
+.list table th {
+  height: 40px !important;
+}
+.list table td {
+  padding: 5px 0 !important;
+}
+.list table td img {
+  width: 60px !important;
+  height: 60px !important;
+}
+.list table td a {
+  display: inline;
+  color: #e77e11;
+}
+.list table td .del {
+  margin-left: 10px;
+  color: red;
+}
+.list .footer {
+  margin-top: 3px !important;
+  justify-content: flex-end !important;
+}
+.list .footer-right {
+  height: 50px;
+  display: flex;
+  justify-content: flex-end;
+  align-items: center;
+  color: #666;
+  font-size: 20px;
+}
+.list .footer-right div {
+  margin: 0 5px;
+  cursor: pointer;
+  text-decoration: underline;
+}
+.list .footer-right span {
+  margin: 0 5px !important;
+  font-size: 20px !important;
+  color: #666 !important;
+}
+.list .footer-right ul li {
+  float: left;
+  cursor: pointer;
+  text-decoration: underline;
+}
+.list .footer-right ul li:nth-child(n + 2) {
+  margin-left: 10px;
+}
+.list .footer-right ul li.active {
+  font-weight: 700;
+  color: #e77e11;
+  font-size: 24px;
+}
+.list .footer-right input {
+  width: 40px;
+  height: 30px;
+}
+.list .footer-right button {
+  width: 60px;
+  height: 30px;
+  border: none;
+  outline: none;
+  background-color: #e77e11;
+  color: #fff;
+  margin-left: 10px;
+  cursor: pointer;
+}

+ 24 - 0
JavaWeb03/servlet04_login/src/main/webapp/static/css/book_edit.css

@@ -0,0 +1,24 @@
+.header {
+  margin: 0;
+}
+.header-left {
+  margin: 0;
+}
+.header-right {
+  margin: 0;
+}
+.login_banner {
+  margin: 0;
+}
+.login_banner .register_form {
+  padding: 30px 0;
+}
+.login_banner .register_form .form-item {
+  margin-top: 10px !important;
+}
+.bottom {
+  margin: 0;
+  background-color: #fff;
+  color: #333;
+  margin-top: 10px;
+}

+ 217 - 0
JavaWeb03/servlet04_login/src/main/webapp/static/css/cart.css

@@ -0,0 +1,217 @@
+.header {
+  height: 100px;
+  border-bottom: 2px solid #e77e11;
+}
+.header .w {
+  height: 100%;
+  display: flex;
+  justify-content: space-between;
+}
+.header .w .header-left {
+  display: flex;
+  align-items: center;
+  height: 100%;
+}
+.header .w .header-left img {
+  width: 200px;
+  height: 62px;
+}
+.header .w .header-left h1 {
+  font-size: 30px;
+  margin-left: 30px;
+}
+.header .w .header-left span {
+  font-size: 30px;
+  margin-left: 30px;
+}
+.header .w .header-right {
+  height: 100%;
+  display: flex;
+  align-items: center;
+}
+.header .w .header-right h3 {
+  font-size: 20px;
+  margin-right: 10px;
+}
+.header .w .header-right h3 span {
+  color: red;
+  margin: 0 5px;
+}
+.header .w .header-right div {
+  font-size: 20px;
+  color: #e77e11;
+  cursor: pointer;
+}
+.header .w .header-right div a {
+  font-size: 20px;
+  color: #e77e11;
+}
+.header .w .header-right div:hover {
+  color: skyblue;
+}
+.header .w .header-right .destory {
+  margin: 0 10px;
+}
+.list {
+  background-color: #f5f5f5;
+  padding: 20px 0;
+}
+.list .w table {
+  background-color: #fff;
+  width: 100%;
+}
+.list .w table thead {
+  border-bottom: 1px solid #ccc;
+}
+.list .w table thead th {
+  height: 70px;
+  text-align: center;
+}
+.list .w table thead th input {
+  margin: 0 10px;
+}
+.list .w table tbody tr {
+  border-bottom: 1px solid #eee;
+  height: 100%;
+}
+.list .w table tbody tr td {
+  height: 100%;
+  padding: 10px 0;
+  text-align: center;
+}
+.list .w table tbody tr td img {
+  width: 80px;
+  height: 80px;
+}
+.list .w table tbody tr td:nth-child(2) {
+  padding: 0 20px;
+  width: 300px;
+  max-width: 300px;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+.list .w table tbody tr td:nth-child(3) {
+  height: 100%;
+}
+.list .w table tbody tr td:nth-child(3) .count {
+  display: inline-block;
+  width: 25px;
+  height: 25px;
+  border: 1px solid #ccc;
+  line-height: 22px;
+  text-align: center;
+  cursor: pointer;
+}
+.list .w table tbody tr td:nth-child(3) .count-num {
+  margin: 0 10px;
+  display: inline-block;
+  width: 40px;
+  height: 25px;
+  text-align: center;
+}
+.list .w .footer {
+  height: 50px;
+  background-color: #fff;
+  margin-top: 20px;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+.list .w .footer-left {
+  margin-left: 20px;
+  display: flex;
+  align-items: center;
+  color: #e77e11;
+  font-size: 20px;
+  cursor: pointer;
+}
+.list .w .footer-left .clear-cart {
+  margin-right: 20px;
+}
+.list .w .footer-left a {
+  color: #e77e11;
+}
+.list .w .footer-left a:hover {
+  color: skyblue;
+}
+/*.list .w .footer-left div:hover {*/
+/*  color: skyblue;*/
+/*}*/
+.list .w .footer-right {
+  height: 100%;
+  display: flex;
+  align-items: center;
+}
+.list .w .footer-right .total-price {
+  margin-left: 20px;
+}
+.list .w .footer-right span {
+  color: red;
+  font-size: 24px;
+  margin: 0 10px;
+}
+.list .w .footer-right .pay {
+  height: 50px;
+  line-height: 50px;
+  background-color: #e77e11;
+  color: #fff;
+  padding: 0 20px;
+  margin-left: 20px;
+  cursor: pointer;
+}
+.list .w .footer-right .pay:hover {
+  background-color: red;
+}
+.bottom {
+  opacity: 0.6;
+  background-color: #323232;
+  margin-top: 10px;
+  color: #fff;
+  text-align: center;
+}
+.bottom .top {
+  height: 100px;
+  border-bottom: 1px solid #474747;
+}
+.bottom .top ul {
+  display: flex;
+  justify-content: space-around;
+  height: 100%;
+}
+.bottom .top ul li {
+  height: 100%;
+  display: flex;
+  align-items: center;
+}
+.bottom .top ul li a {
+  color: #fff;
+  display: flex;
+  align-items: center;
+}
+.bottom .top ul li a span {
+  margin-left: 10px;
+}
+.bottom .content {
+  height: 100px;
+  display: flex;
+  padding-top: 25px;
+  justify-content: center;
+  cursor: pointer;
+}
+.bottom .content dl {
+  width: 180px;
+}
+.bottom .content dl dt {
+  font-size: 20px;
+}
+.bottom .content dl dd {
+  margin-top: 20px;
+  font-size: 14px;
+  color: #a8a8a8;
+}
+.bottom .down {
+  height: 40px;
+  background-color: #2a2a2a;
+  line-height: 40px;
+}

+ 12 - 0
JavaWeb03/servlet04_login/src/main/webapp/static/css/common.css

@@ -0,0 +1,12 @@
+.w {
+  width: 1226px;
+  margin: 0 auto;
+}
+
+.clearfix::after {
+  content: '.';
+  display: block;
+  height: 0;
+  clear: both;
+  visibility: hidden;
+}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 3 - 0
JavaWeb03/servlet04_login/src/main/webapp/static/css/iconfont.css


+ 473 - 0
JavaWeb03/servlet04_login/src/main/webapp/static/css/index.css

@@ -0,0 +1,473 @@
+.topbar {
+  height: 40px;
+  font-size: 12px;
+  color: #b0b0b0;
+  background: #f5f5f5;
+}
+.topbar .topbar-left {
+  float: left;
+  position: relative;
+}
+.topbar .topbar-left i {
+  float: left;
+  line-height: 40px;
+  color: #6c6c6c;
+  margin-right: 5px;
+}
+.topbar .topbar-right {
+  float: right;
+  line-height: 40px;
+}
+.topbar .topbar-right a {
+  color: #6c6c6c;
+  float: left;
+  margin-right: 10px;
+}
+.topbar .topbar-right span {
+  color: #6c6c6c;
+  float: left;
+  margin-right: 10px;
+  font-size: 18px;
+}
+.topbar .topbar-right span b {
+  color: #ff0000;
+}
+.topbar .topbar-right a:hover {
+  color: #e77e11;
+}
+.topbar .topbar-right .login,
+.topbar .topbar-right .register,
+.topbar .topbar-right .admin {
+  font-size: 18px;
+  color: #e77e11;
+}
+.topbar .topbar-right .login:hover,
+.topbar .topbar-right .register:hover,
+.topbar .topbar-right .admin:hover {
+  color: skyblue;
+}
+.topbar .topbar-right .login {
+  font-size: 20px;
+  color: #e77e11;
+}
+.topbar .topbar-right .cart {
+  padding: 0 10px;
+  background-color: #e77e11;
+  color: #fff;
+  font-size: 16px;
+  position: relative;
+}
+.topbar .topbar-right .cart:hover {
+  color: #e77e11;
+  background-color: #f00;
+}
+.topbar .topbar-right .cart-num {
+  width: 23px;
+  height: 15px;
+  background-color: #f00;
+  position: absolute;
+  top: 2px;
+  right: 3px;
+  line-height: 15px;
+  text-align: center;
+  border-radius: 50%;
+  color: #fff;
+}
+.header {
+  height: 100px;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+.header-logo {
+  width: 200px;
+  height: 62px;
+  background: url('../img/logo.gif') no-repeat;
+  background-size: 100%;
+}
+.header-nav li {
+  float: left;
+  margin-right: 15px;
+}
+.header-nav li a {
+  font-size: 18px;
+  color: #333;
+  font-weight: 700;
+}
+.header-nav li a:hover {
+  color: #e77e11;
+  text-shadow: 3px 2px 5px skyblue;
+}
+.header-search input {
+  width: 245px;
+  height: 50px;
+  border: 1px solid #e0e0e0;
+  float: left;
+}
+.header-search button {
+  width: 50px;
+  height: 50px;
+  float: right;
+  background-color: #fff;
+  border: 1px solid #e0e0e0;
+  font-size: 18px;
+  outline: none;
+}
+.banner-left {
+  width: 234px;
+  height: 360px;
+  background-color: #f0f0f0;
+  float: left;
+}
+.banner-left ul {
+  padding: 20px 0;
+}
+.banner-left ul li {
+  padding: 0 20px;
+}
+.banner-left ul li a {
+  height: 42px;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  color: #e77e11;
+}
+.banner-left ul li a:hover {
+  color: #fff;
+}
+.banner-left ul li:hover {
+  background-color: #e77e11;
+}
+.banner-right {
+  width: 992px;
+  float: right;
+}
+.banner-right li {
+  width: 992px;
+  height: 360px;
+}
+.banner-right li img {
+  width: 100%;
+  height: 100%;
+}
+.books-list {
+  margin-top: 15px;
+  background-color: #f5f5f5;
+}
+.books-list input {
+  text-align: center;
+}
+.books-list .list-header {
+  height: 58px;
+  font-size: 22px;
+  font-weight: 200;
+  line-height: 58px;
+  color: #333;
+  display: flex;
+  justify-content: space-between;
+}
+.books-list .list-header .price-search {
+  font-size: 20px;
+  color: #e77e11;
+  display: flex;
+  align-items: center;
+}
+.books-list .list-header .price-search input {
+  width: 60px;
+  height: 30px;
+  margin: 0 10px;
+}
+.books-list .list-header .price-search button {
+  width: 60px;
+  height: 30px;
+  border: none;
+  background-color: #e77e11;
+  outline: none;
+  color: #fff;
+  margin-left: 10px;
+}
+.books-list .list-content {
+  display: flex;
+  flex-wrap: wrap;
+  justify-content: space-between;
+}
+.books-list .list-content .list-item {
+  transition: all 0.5s;
+  flex-shrink: 0;
+  width: 234px;
+  height: 339px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  color: #000;
+  background-color: #fff;
+  margin-bottom: 10px;
+}
+.books-list .list-content .list-item img {
+  width: 160px;
+  height: 200px;
+  margin: 5px 0;
+}
+.books-list .list-content .list-item p {
+  font-size: 12px;
+  color: #999;
+}
+.books-list .list-content .list-item .cur-price {
+  color: red;
+  font-size: 18px;
+}
+.books-list .list-content .list-item .pre-price {
+  color: #666;
+  text-decoration: line-through;
+  font-size: 12px;
+}
+.books-list .list-content .list-item button {
+  width: 80px;
+  height: 30px;
+  border: none;
+  background-color: #e77e11;
+  margin-top: 5px;
+  outline: none;
+  color: #fff;
+  cursor:pointer;
+}
+.books-list .list-content .list-item:hover {
+  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
+  transform: translate3d(0, -2px, 0);
+}
+.books-list .list-footer {
+  height: 50px;
+  display: flex;
+  justify-content: flex-end;
+  align-items: center;
+  color: #666;
+  font-size: 20px;
+}
+.books-list .list-footer div {
+  margin: 0 5px;
+  cursor: pointer;
+  text-decoration: underline;
+}
+.books-list .list-footer span {
+  margin: 0 5px;
+}
+.books-list .list-footer ul li {
+  float: left;
+  cursor: pointer;
+  text-decoration: underline;
+}
+.books-list .list-footer ul li:nth-child(n + 2) {
+  margin-left: 10px;
+}
+.books-list .list-footer ul li.active {
+  font-weight: 700;
+  color: #e77e11;
+  font-size: 24px;
+}
+.books-list .list-footer input {
+  width: 40px;
+  height: 30px;
+}
+.books-list .list-footer button {
+  width: 60px;
+  height: 30px;
+  border: none;
+  outline: none;
+  background-color: #e77e11;
+  color: #fff;
+  margin-left: 10px;
+  cursor: pointer;
+}
+.cate {
+  height: 170px;
+  margin-top: 14px;
+  display: flex;
+  justify-content: space-between;
+}
+.cate .list {
+  width: 234px;
+  height: 170px;
+  background-color: #e77e11;
+}
+.cate .list-item {
+  float: left;
+  width: 78px;
+  height: 85px;
+  box-sizing: border-box;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-direction: column;
+  color: #fff;
+  opacity: 0.7;
+}
+.cate .list-item i {
+  font-size: 24px;
+  margin-bottom: 3px;
+}
+.cate .list-item:hover {
+  opacity: 1;
+}
+.cate .img {
+  width: 316px;
+  height: 170px;
+  background-color: pink;
+}
+.cate .img img {
+  width: 100%;
+  height: 100%;
+}
+.books {
+  margin-top: 15px;
+}
+.books .seckill {
+  margin-top: 20px;
+}
+.books .seckill-header {
+  height: 58px;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+.books .seckill-header .title {
+  margin-left: 10px;
+  font-size: 22px;
+  font-weight: 200;
+  line-height: 58px;
+  color: #333;
+}
+.books .seckill-header i {
+  margin-right: 20px;
+  font-size: 20px;
+  color: #e77e11;
+  cursor: pointer;
+}
+.books .seckill-content {
+  height: 339px;
+  display: flex;
+  justify-content: space-between;
+}
+.books .seckill-content a {
+  width: 234px;
+  height: 339px;
+  background-color: #fff;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+.books .seckill-content a h5 {
+  margin-top: 40px;
+  margin-bottom: 30px;
+}
+.books .seckill-content a i {
+  font-size: 66px;
+  color: red;
+  margin-bottom: 30px;
+}
+.books .seckill-content a .downcount {
+  display: flex;
+}
+.books .seckill-content a .downcount .time {
+  width: 42px;
+  height: 42px;
+  background-color: #e77e11;
+  text-align: center;
+  line-height: 42px;
+  color: #fff;
+  font-size: 24px;
+  font-weight: 500;
+}
+.books .seckill-content a .downcount .token {
+  height: 42px;
+  line-height: 42px;
+  margin: 0 10px;
+  color: #e77e11;
+  font-size: 24px;
+  font-weight: 500;
+}
+.books .seckill-content .tip {
+  background-color: #f1eded;
+}
+.books .seckill-content .books-sec {
+  display: flex;
+  flex-direction: column;
+  color: #000;
+}
+.books .seckill-content .books-sec img {
+  width: 160px;
+  height: 200px;
+  margin: 15px 0;
+}
+.books .seckill-content .books-sec p {
+  margin-bottom: 10px;
+}
+.books .seckill-content .books-sec .cur-price {
+  color: red;
+  font-size: 18px;
+}
+.books .seckill-content .books-sec .pre-price {
+  color: #666;
+  text-decoration: line-through;
+  font-size: 12px;
+}
+.books .seckill-content .books-sec button {
+  width: 80px;
+  height: 30px;
+  border: none;
+  background-color: #e77e11;
+  margin-top: 10px;
+  outline: none;
+  color: #fff;
+}
+.bottom {
+  opacity: 0.6;
+  background-color: #323232;
+  margin-top: 10px;
+  color: #fff;
+  text-align: center;
+}
+.bottom .top {
+  height: 100px;
+  border-bottom: 1px solid #474747;
+}
+.bottom .top ul {
+  display: flex;
+  justify-content: space-around;
+  height: 100%;
+}
+.bottom .top ul li {
+  height: 100%;
+  display: flex;
+  align-items: center;
+}
+.bottom .top ul li a {
+  color: #fff;
+  display: flex;
+  align-items: center;
+}
+.bottom .top ul li a span {
+  margin-left: 10px;
+}
+.bottom .content {
+  height: 100px;
+  display: flex;
+  padding-top: 25px;
+  justify-content: center;
+  cursor: pointer;
+}
+.bottom .content dl {
+  width: 180px;
+}
+.bottom .content dl dt {
+  font-size: 20px;
+}
+.bottom .content dl dd {
+  margin-top: 20px;
+  font-size: 14px;
+  color: #a8a8a8;
+}
+.bottom .down {
+  height: 40px;
+  background-color: #2a2a2a;
+  line-height: 40px;
+}

+ 97 - 0
JavaWeb03/servlet04_login/src/main/webapp/static/css/minireset.css

@@ -0,0 +1,97 @@
+/*! minireset.css v0.0.2 | MIT License | github.com/jgthms/minireset.css */
+html,
+body,
+p,
+ol,
+ul,
+li,
+dl,
+dt,
+dd,
+blockquote,
+figure,
+fieldset,
+legend,
+textarea,
+pre,
+iframe,
+hr,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+  margin: 0;
+  padding: 0;
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+  font-size: 100%;
+  font-weight: normal;
+}
+
+ul {
+  list-style: none;
+}
+
+button,
+input,
+select,
+textarea {
+  margin: 0;
+}
+
+html {
+  box-sizing: border-box;
+}
+
+* {
+  box-sizing: inherit;
+}
+*:before,
+*:after {
+  box-sizing: inherit;
+}
+
+img,
+embed,
+object,
+audio,
+video {
+  height: auto;
+  max-width: 100%;
+}
+
+iframe {
+  border: 0;
+}
+
+table {
+  border-collapse: collapse;
+  border-spacing: 0;
+}
+
+td,
+th {
+  padding: 0;
+  text-align: left;
+}
+
+a,
+i {
+  text-decoration: none;
+  font-style: normal;
+  display: block;
+}
+input {
+  outline: none;
+}
+button {
+  outline: none;
+}

+ 9 - 0
JavaWeb03/servlet04_login/src/main/webapp/static/css/orderManger.css

@@ -0,0 +1,9 @@
+.list input {
+  text-align: center;
+}
+.list table td {
+  padding: 15px 0 !important;
+}
+.list table td a.send {
+  color: #666;
+}

+ 65 - 0
JavaWeb03/servlet04_login/src/main/webapp/static/css/register.css

@@ -0,0 +1,65 @@
+.login_banner {
+
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+}
+.login_banner .register_form {
+  width: 506px;
+  height: 450px;
+  background-color: #fff;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+.login_banner .register_form h1 {
+  color: #e77e11;
+  margin: 15px 0;
+}
+.login_banner .register_form form {
+  width: 100%;
+  height: 100%;
+  font-size: 16px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+.login_banner .register_form form .form-item {
+
+  width: 346px;
+  flex-direction: column;
+  margin: 0;
+}
+.login_banner .register_form form .form-item div {
+  margin: 0;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+.login_banner .register_form form .form-item div input {
+  width: 262px;
+  height: 40px;
+  border: 1px #e3e3e3 solid;
+  outline: none;
+}
+.login_banner .register_form form .form-item .errMess {
+  font-size: 12px;
+  color: red;
+  /*visibility: hidden;*/
+  margin: 2px 0;
+}
+.login_banner .register_form form .form-item:nth-last-child(2) .verify {
+  width: 268px;
+}
+.login_banner .register_form form .form-item:nth-last-child(2) .verify input {
+  width: 146px;
+}
+.login_banner .register_form form .btn {
+  width: 360px;
+  height: 40px;
+  background-color: #e77e11;
+  color: #fff;
+  outline: none;
+  border: none;
+  margin-top: 10px;
+}

+ 360 - 0
JavaWeb03/servlet04_login/src/main/webapp/static/css/style.css

@@ -0,0 +1,360 @@
+@charset "UTF-8";
+
+body {
+  overflow: hidden;
+}
+input {
+  outline: none;
+  /* text-align: center; */
+}
+
+* {
+  margin: 0;
+  font-family: 'Microsoft Yahei';
+  /* color: #666; */
+}
+
+div {
+  margin: auto;
+  margin-bottom: 10px;
+  margin-top: 10px;
+}
+.cont {
+  margin-left: 20px;
+}
+#header {
+  height: 82px;
+  width: 1200px;
+}
+
+#main {
+  height: 460px;
+  width: 1200px;
+  border: 1px black solid;
+  overflow: auto;
+}
+
+#bottom {
+  height: 30px;
+  width: 1200px;
+  text-align: center;
+}
+
+#book {
+  width: 100%;
+  height: 90%;
+  margin: auto;
+}
+
+.b_list {
+  height: 300px;
+  width: 250px;
+  margin: 20px;
+  float: left;
+  margin-top: 0px;
+  margin-bottom: 0px;
+  border: 1px #e3e3e3 solid;
+}
+
+#page_nav {
+  width: 100%;
+  height: 10px;
+  margin: auto;
+
+  text-align: center;
+}
+
+#pn_input {
+  width: 30px;
+  text-align: center;
+}
+
+.img_div {
+  height: 150px;
+  text-align: center;
+}
+
+.book_img {
+  height: 150px;
+  width: 150px;
+}
+
+.book_info {
+  text-align: center;
+}
+
+.book_info div {
+  height: 10px;
+  width: 300px;
+  text-align: left;
+}
+
+.wel_word {
+  font-size: 60px;
+  float: left;
+}
+
+.logo_img {
+  float: left;
+}
+
+#header div a {
+  text-decoration: none;
+  font-size: 20px;
+}
+
+#header div {
+  float: right;
+  margin-top: 55px;
+}
+
+.book_cond {
+  margin-left: 903px;
+}
+.book_cond .sp1 {
+  color: red;
+}
+
+.book_cond input {
+  width: 50px;
+  text-align: center;
+}
+
+/*登录页面CSS样式  */
+
+#login_header {
+  height: 82px;
+  width: 1200px;
+}
+
+.login_banner {
+  height: 475px;
+  background-color: #e77e11;
+}
+
+.login_form {
+  height: 310px;
+  width: 406px;
+  float: right;
+  margin-right: 50px;
+  margin-top: 50px;
+  background-color: #fff;
+}
+
+#content {
+  height: 475px;
+  width: 1200px;
+}
+
+.login_box {
+  margin: 20px;
+  height: 260px;
+  /* width: 366px; */
+}
+
+h1 {
+  font-size: 20px;
+}
+.msg_cont {
+  background: none repeat scroll 0 0 #fff6d2;
+  border: 1px solid #ffe57d;
+  color: #666;
+  height: 18px;
+  line-height: 18px;
+  padding: 3px 10px 3px 40px;
+  position: relative;
+  border: none;
+}
+
+.msg_cont b {
+  background: url('../img/pwd-icons-new.png') no-repeat scroll -104px -22px
+    rgba(0, 0, 0, 0);
+  display: block;
+  height: 17px;
+  left: 10px;
+  margin-top: -8px;
+  overflow: hidden;
+  position: absolute;
+  top: 50%;
+  width: 16px;
+}
+
+.form .itxt {
+  /* width: 100px; */
+  border: 0 none;
+  float: none;
+  font-family: '宋体';
+  font-size: 14px;
+  height: 18px;
+  line-height: 18px;
+  overflow: hidden;
+  padding: 10px 0 10px 10px;
+  width: 250px;
+  border: 1px #e3e3e3 solid;
+}
+.inp {
+  margin-left: 15px;
+}
+#sub_btn {
+  background-color: #e77e11;
+  border: none;
+  color: #fff;
+  width: 360px;
+  height: 40px;
+}
+
+#l_content {
+  float: left;
+  margin-top: 0px;
+  margin-left: 300px;
+}
+
+#l_content span {
+  font-size: 60px;
+  color: white;
+}
+
+.tit h1 {
+  width: 100%;
+  text-align: center;
+  float: left;
+  /* margin-top: 5px; */
+  font-size: 24px;
+  margin-bottom: 10px;
+  color: #e77e11;
+}
+
+.tit a {
+  float: right;
+  margin-left: 10px;
+  margin-top: 10px;
+  color: red;
+  text-decoration: none;
+}
+
+.tit .errorMsg {
+  float: right;
+  margin-left: 10px;
+  margin-top: 10px;
+  color: red;
+}
+
+.tit {
+  height: 30px;
+}
+.tit a {
+  color: #e77e11;
+}
+/*购物车*/
+#main table {
+  margin: auto;
+  margin-top: 80px;
+  border-collapse: collapse;
+}
+
+#main table td {
+  width: 120px;
+  text-align: center;
+  border-bottom: 1px #e3e3e3 solid;
+  padding: 10px;
+}
+
+.cart_info {
+  width: 700px;
+  text-align: right;
+}
+/*优化购物车超链接*/
+.cart_info a {
+  text-decoration: none;
+}
+/* .cart_info cart_span a{ */
+/* 	padding: 10px 0; */
+/* 	display: block; */
+/* 	background-color: #07c160; */
+/* 	color: #fff!important; */
+/* 	border: 1px solid #07c160; */
+/* 	border-radius: 2px; */
+/* } */
+
+.cart_span {
+  margin-left: 15px;
+}
+
+.cart_span span {
+  color: red;
+  font-size: 20px;
+  margin: 10px;
+}
+
+.cart_span a,
+td a {
+  font-size: 20px;
+  color: blue;
+}
+
+#header div span {
+  margin: 10px;
+}
+
+#header div .um_span {
+  color: red;
+  font-size: 25px;
+  margin: 10px;
+}
+
+#header div a {
+  color: blue;
+}
+#header .user {
+  margin-right: 35px;
+}
+
+/* 图书管理 */
+
+#main.box_no {
+  /* 	border: 0; */
+}
+#main.box_no table td {
+  width: 120px;
+  text-align: center;
+  border: 1px #e3e3e3 solid;
+  padding: 10px;
+}
+#main.box_no table td > a {
+  text-decoration: none;
+}
+#main.box_no table td .a_green {
+  color: #07c160;
+}
+#main.box_no table tr:last-child td {
+  border: 0;
+}
+#main.box_no table tr:last-child td > a {
+  padding: 6px 0;
+  display: block;
+  background-color: #07c160;
+  color: #fff !important;
+  border: 1px solid #07c160;
+  border-radius: 2px;
+}
+#main.box_no table tr td:last-child a {
+  color: red;
+}
+
+/*订单列表*/
+
+#main.box_order table td {
+  width: 120px;
+  text-align: center;
+  border: 1px #e3e3e3 solid;
+  padding: 10px;
+}
+#main.box_order table tr:first {
+  font-weight: bolder;
+}
+#main.box_order table td > a {
+  text-decoration: none;
+}
+#main.box_order table td .a_green {
+  color: #07c160;
+}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 11 - 0
JavaWeb03/servlet04_login/src/main/webapp/static/css/swiper.min.css


BIN
JavaWeb03/servlet04_login/src/main/webapp/static/img/QR.gif


BIN
JavaWeb03/servlet04_login/src/main/webapp/static/img/bottom.png


BIN
JavaWeb03/servlet04_login/src/main/webapp/static/img/bottom1.png


BIN
JavaWeb03/servlet04_login/src/main/webapp/static/img/bottom2.png


Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor