+
+
+
+
+
\ No newline at end of file
diff --git a/SpringMvc4.3-Start1/WebContent/WEB-INF/jsp/ProductUpdated.jsp b/SpringMvc4.3-Start1/WebContent/WEB-INF/jsp/ProductUpdated.jsp
new file mode 100644
index 0000000..b28d754
--- /dev/null
+++ b/SpringMvc4.3-Start1/WebContent/WEB-INF/jsp/ProductUpdated.jsp
@@ -0,0 +1,13 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+
+
+
+
+
Insert title here
+
+
+ Tips:${message}
+
显示所有产品
+
+
\ No newline at end of file
diff --git a/SpringMvc4.3-Start1/WebContent/WEB-INF/jsp/ProductView.jsp b/SpringMvc4.3-Start1/WebContent/WEB-INF/jsp/ProductView.jsp
new file mode 100644
index 0000000..ee6aced
--- /dev/null
+++ b/SpringMvc4.3-Start1/WebContent/WEB-INF/jsp/ProductView.jsp
@@ -0,0 +1,23 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+
+
+
+
+
Insert title here
+
+
+
+
The product has been saved!
+
Details:
+ Tips:${message}
+ Product ID:${product.id}
+ Product Name:${product.name}
+ Product Vender:${product.vender}
+ Address:${product.address}
+ Description:${product.description}
+ Price:¥${product.price}
+
显示所有产品
+
+
+
\ No newline at end of file
diff --git a/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/commons-logging-1.2.jar b/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/commons-logging-1.2.jar
new file mode 100644
index 0000000..93a3b9f
Binary files /dev/null and b/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/commons-logging-1.2.jar differ
diff --git a/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/jstl.jar b/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/jstl.jar
new file mode 100644
index 0000000..a02abec
Binary files /dev/null and b/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/jstl.jar differ
diff --git a/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/log4j-1.2.17.jar b/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/log4j-1.2.17.jar
new file mode 100644
index 0000000..068867e
Binary files /dev/null and b/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/log4j-1.2.17.jar differ
diff --git a/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/lombok-1.16.12.jar b/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/lombok-1.16.12.jar
new file mode 100644
index 0000000..23cc160
Binary files /dev/null and b/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/lombok-1.16.12.jar differ
diff --git a/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/spring-aop-4.3.3.RELEASE.jar b/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/spring-aop-4.3.3.RELEASE.jar
new file mode 100644
index 0000000..7f78221
Binary files /dev/null and b/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/spring-aop-4.3.3.RELEASE.jar differ
diff --git a/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/spring-beans-4.3.3.RELEASE.jar b/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/spring-beans-4.3.3.RELEASE.jar
new file mode 100644
index 0000000..8d25ec2
Binary files /dev/null and b/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/spring-beans-4.3.3.RELEASE.jar differ
diff --git a/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/spring-context-4.3.3.RELEASE.jar b/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/spring-context-4.3.3.RELEASE.jar
new file mode 100644
index 0000000..fbf01c7
Binary files /dev/null and b/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/spring-context-4.3.3.RELEASE.jar differ
diff --git a/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/spring-core-4.3.3.RELEASE.jar b/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/spring-core-4.3.3.RELEASE.jar
new file mode 100644
index 0000000..ded56ad
Binary files /dev/null and b/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/spring-core-4.3.3.RELEASE.jar differ
diff --git a/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/spring-expression-4.3.3.RELEASE.jar b/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/spring-expression-4.3.3.RELEASE.jar
new file mode 100644
index 0000000..c30b677
Binary files /dev/null and b/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/spring-expression-4.3.3.RELEASE.jar differ
diff --git a/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/spring-web-4.3.3.RELEASE.jar b/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/spring-web-4.3.3.RELEASE.jar
new file mode 100644
index 0000000..e178d80
Binary files /dev/null and b/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/spring-web-4.3.3.RELEASE.jar differ
diff --git a/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/spring-webmvc-4.3.3.RELEASE.jar b/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/spring-webmvc-4.3.3.RELEASE.jar
new file mode 100644
index 0000000..5686d2a
Binary files /dev/null and b/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/spring-webmvc-4.3.3.RELEASE.jar differ
diff --git a/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/standard-1.1.2.jar b/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/standard-1.1.2.jar
new file mode 100644
index 0000000..bc528ac
Binary files /dev/null and b/SpringMvc4.3-Start1/WebContent/WEB-INF/lib/standard-1.1.2.jar differ
diff --git a/SpringMvc4.3-Start1/WebContent/WEB-INF/web.xml b/SpringMvc4.3-Start1/WebContent/WEB-INF/web.xml
new file mode 100644
index 0000000..e5b0fda
--- /dev/null
+++ b/SpringMvc4.3-Start1/WebContent/WEB-INF/web.xml
@@ -0,0 +1,43 @@
+
+
+ SpringMvc4.3-Start1
+
+ index.html
+
+
+
+
+ springmvc
+ org.springframework.web.servlet.DispatcherServlet
+
+ contextConfigLocation
+ /WEB-INF/config/springmvc-config.xml
+
+ 1
+
+
+ springmvc
+
+
+ *.action
+
+
+
+ characterEncodingFilter
+ org.springframework.web.filter.CharacterEncodingFilter
+
+ encoding
+ UTF-8
+
+
+ forceEncoding
+ true
+
+
+
+ characterEncodingFilter
+ /*
+
+
+
+
\ No newline at end of file
diff --git a/SpringMvc4.3-Start1/WebContent/index.html b/SpringMvc4.3-Start1/WebContent/index.html
new file mode 100644
index 0000000..c155b0a
--- /dev/null
+++ b/SpringMvc4.3-Start1/WebContent/index.html
@@ -0,0 +1,11 @@
+
+
+
+
+
Insert title here
+
+
+
Hello SpringMVC!
+
添加产品
+
+
\ No newline at end of file
diff --git a/SpringMvc4.3-Start1/src/com/gc/springmvc/controller/ProductController.java b/SpringMvc4.3-Start1/src/com/gc/springmvc/controller/ProductController.java
new file mode 100644
index 0000000..9a50409
--- /dev/null
+++ b/SpringMvc4.3-Start1/src/com/gc/springmvc/controller/ProductController.java
@@ -0,0 +1,117 @@
+package com.gc.springmvc.controller;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.websocket.server.PathParam;
+
+import org.apache.log4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpRequest;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import com.gc.springmvc.domian.Product;
+import com.gc.springmvc.form.ProductForm;
+import com.gc.springmvc.service.ProductService;
+
+@Controller
+public class ProductController {
+ private static final Logger logger = Logger.getLogger(ProductController.class);
+
+ //Զעݿдݵ
+ @Autowired
+ private ProductService productService;
+
+ @Autowired
+ private HttpServletRequest request;
+
+ @RequestMapping(value="/product_input")
+ public String inputProduct() {
+ logger.info("inputProduct ã ");
+ return "ProductForm";
+ }
+ @RequestMapping(value="/product_save",method=RequestMethod.POST)
+ public String saveProduct(ProductForm productForm ,RedirectAttributes redirectAttributes) {
+ logger.info("saveProductã");
+
+ Product product = new Product();
+ product.setName(productForm.getName());
+ product.setVender(productForm.getVender());
+ product.setAddress(productForm.getAddress());
+ product.setDescription(productForm.getDescription());
+
+ try {
+ product.setPrice(Double.parseDouble(productForm.getPrice()));
+ } catch (NumberFormatException e) {
+ e.printStackTrace();
+ }
+
+ //add product
+ Product saveProduct = productService.add(product);
+ //ʹĶضֵ
+ redirectAttributes.addFlashAttribute("message","the product was successful added!");
+ return "redirect:/product_view/"+saveProduct.getId()+".action";
+ }
+ @RequestMapping(value="product_view/{id}")//{}ڵidΪ·
+ public String viewProduct(@PathVariable Long id,Model model){
+ Product product = productService.get(id);
+ model.addAttribute("product",product);
+ return "ProductView";
+ }
+ @RequestMapping(value="product_retrieve")//{}ڵidΪ·
+ public String sendProduct(@RequestParam Long id,Model model){
+ Product product = productService.get(id);
+ model.addAttribute("product",product);
+ return "ProductView";
+ }
+
+
+ //½һʵactionչʾвƷϢ
+ @RequestMapping(value="/product_view/product_show")
+ public String showPro(Model model){
+ List
proList = productService.proShow();
+ model.addAttribute("proList",proList);
+ return"ProductList";
+ }
+
+ //idɾƷ
+ @RequestMapping(value="/product_view/product_del")
+ public String del(@RequestParam long id ) {
+ productService.del(id);
+ return "ProductDel";
+ }
+
+ //ѡ
+ @RequestMapping(value="/product_view/product_uping")
+ public String updatePro(@RequestParam long id,Model model){
+ Product product = productService.update(id);
+ model.addAttribute("product", product);
+ return "ProductUp";
+ }
+ //ɹ
+ @RequestMapping(value="/product_view/product_updated" ,method=RequestMethod.POST)
+ public String updated(ProductForm productForm ) {
+ long id =Long.parseLong(request.getParameter("id"));
+ Product product = productService.get(id);
+ product.setName(productForm.getName());
+ product.setVender(productForm.getVender());
+ product.setAddress(productForm.getAddress());
+ product.setDescription(productForm.getDescription());
+
+ try {
+ product.setPrice(Double.parseDouble(productForm.getPrice()));
+ } catch (NumberFormatException e) {
+ e.printStackTrace();
+ }
+
+ return "ProductUpdated";
+ }
+
+}
diff --git a/SpringMvc4.3-Start1/src/com/gc/springmvc/domian/Product.java b/SpringMvc4.3-Start1/src/com/gc/springmvc/domian/Product.java
new file mode 100644
index 0000000..01575e1
--- /dev/null
+++ b/SpringMvc4.3-Start1/src/com/gc/springmvc/domian/Product.java
@@ -0,0 +1,47 @@
+package com.gc.springmvc.domian;
+
+public class Product {
+ private Long id;
+ private String name;
+ private String description;
+ private Double price;
+ private String address;
+ private String vender;
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public String getDescription() {
+ return description;
+ }
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ public Double getPrice() {
+ return price;
+ }
+ public void setPrice(Double price) {
+ this.price = price;
+ }
+ public String getAddress() {
+ return address;
+ }
+ public void setAddress(String address) {
+ this.address = address;
+ }
+ public String getVender() {
+ return vender;
+ }
+ public void setVender(String vender) {
+ this.vender = vender;
+ }
+
+}
diff --git a/SpringMvc4.3-Start1/src/com/gc/springmvc/form/ProductForm.java b/SpringMvc4.3-Start1/src/com/gc/springmvc/form/ProductForm.java
new file mode 100644
index 0000000..3704f0c
--- /dev/null
+++ b/SpringMvc4.3-Start1/src/com/gc/springmvc/form/ProductForm.java
@@ -0,0 +1,15 @@
+package com.gc.springmvc.form;
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Setter
+@Getter
+public class ProductForm {
+
+ private String name;
+ private String address;
+ private String vender;
+ private String description;
+ private String price;
+}
diff --git a/SpringMvc4.3-Start1/src/com/gc/springmvc/service/ProductService.java b/SpringMvc4.3-Start1/src/com/gc/springmvc/service/ProductService.java
new file mode 100644
index 0000000..d472165
--- /dev/null
+++ b/SpringMvc4.3-Start1/src/com/gc/springmvc/service/ProductService.java
@@ -0,0 +1,14 @@
+package com.gc.springmvc.service;
+
+import java.util.List;
+
+import com.gc.springmvc.domian.Product;
+
+public interface ProductService {
+ Product add(Product product);
+ Product get(long id);
+ List proShow();
+ List del(long id);
+ Product update(long id);
+ List updated(Product product ,long id);
+}
diff --git a/SpringMvc4.3-Start1/src/com/gc/springmvc/service/impl/ProductServiceImpl.java b/SpringMvc4.3-Start1/src/com/gc/springmvc/service/impl/ProductServiceImpl.java
new file mode 100644
index 0000000..0a70350
--- /dev/null
+++ b/SpringMvc4.3-Start1/src/com/gc/springmvc/service/impl/ProductServiceImpl.java
@@ -0,0 +1,75 @@
+package com.gc.springmvc.service.impl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicLong;
+
+import org.omg.PortableServer.POA;
+import org.springframework.stereotype.Service;
+
+import com.gc.springmvc.domian.Product;
+import com.gc.springmvc.service.ProductService;
+@Service
+public class ProductServiceImpl implements ProductService {
+ private Map products = new HashMap();
+ private AtomicLong generator = new AtomicLong();
+
+ public ProductServiceImpl() {
+ Product product = new Product();
+ product.setName("MiBook");
+ product.setDescription("MiBook write code is very cool!");
+ product.setPrice(4999.0d);
+ add(product);
+ // TODO Auto-generated constructor stub
+ }
+ @Override
+ public Product add(Product product) {
+ long newid = generator.incrementAndGet();
+ product.setId(newid);
+
+ //浽MAPУ˲ģݱ浽ݿ
+ products.put(newid, product);
+ return product;
+ }
+
+ @Override
+ public Product get(long id) {
+ return products.get(id);
+ }
+ @Override
+ public List proShow() {
+ List listShow = new ArrayList(products.values());
+ /*Set> inSet = new HashSet>();
+ inSet = products.entrySet();
+ Iterator> iterator = inSet.iterator();
+ for(iterator.hasNext()){
+ listShow.add(iterator.next());*/
+ return listShow;
+ }
+ @Override
+ public List del(long id) {
+ products.remove(id);
+ List listShow = new ArrayList(products.values());
+ return listShow;
+ }
+ @Override
+ public Product update(long id) {
+ Product product = products.get(id);
+ return product;
+ }
+ @Override
+ public List updated(Product product, long id) {
+ products.replace(id, product);
+ List listShow = new ArrayList(products.values());
+ return listShow;
+ }
+
+ }
+
+
diff --git a/SpringMvc4.3-Start1/src/log4j.properties b/SpringMvc4.3-Start1/src/log4j.properties
new file mode 100644
index 0000000..a3b4491
--- /dev/null
+++ b/SpringMvc4.3-Start1/src/log4j.properties
@@ -0,0 +1,9 @@
+# rootLogger\u662F\u6240\u6709\u65E5\u5FD7\u7684\u6839\u65E5\u5FD7,\u4FEE\u6539\u8BE5\u65E5\u5FD7\u5C5E\u6027\u5C06\u5BF9\u6240\u6709\u65E5\u5FD7\u8D77\u4F5C\u7528
+# \u4E0B\u9762\u7684\u5C5E\u6027\u914D\u7F6E\u4E2D,\u6240\u6709\u65E5\u5FD7\u7684\u8F93\u51FA\u7EA7\u522B\u662Finfo,\u8F93\u51FA\u6E90\u662Fconsole
+log4j.rootLogger=info,console
+# \u5B9A\u4E49\u8F93\u51FA\u6E90\u7684\u8F93\u5165\u4F4D\u7F6E\u662F\u63A7\u5236\u53F0
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+# \u5B9A\u4E49\u8F93\u51FA\u65E5\u5FD7\u7684\u5E03\u5C40\u91C7\u7528\u7684\u7C7B
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+# \u5B9A\u4E49\u65E5\u5FD7\u8F93\u51FA\u5E03\u5C40
+log4j.appender.console.layout.ConversionPattern=%d %p [%c] - %m%n
diff --git a/Struts23-Start/.classpath b/Struts23-Start/.classpath
new file mode 100644
index 0000000..05506d5
--- /dev/null
+++ b/Struts23-Start/.classpath
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/Struts23-Start/.project b/Struts23-Start/.project
new file mode 100644
index 0000000..9f23c69
--- /dev/null
+++ b/Struts23-Start/.project
@@ -0,0 +1,31 @@
+
+
+ Struts23-Start
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.wst.common.project.facet.core.builder
+
+
+
+
+ org.eclipse.wst.validation.validationbuilder
+
+
+
+
+
+ org.eclipse.jem.workbench.JavaEMFNature
+ org.eclipse.wst.common.modulecore.ModuleCoreNature
+ org.eclipse.wst.common.project.facet.core.nature
+ org.eclipse.jdt.core.javanature
+ org.eclipse.wst.jsdt.core.jsNature
+
+
diff --git a/Struts23-Start/.settings/.jsdtscope b/Struts23-Start/.settings/.jsdtscope
new file mode 100644
index 0000000..92e666d
--- /dev/null
+++ b/Struts23-Start/.settings/.jsdtscope
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Struts23-Start/.settings/org.eclipse.jdt.core.prefs b/Struts23-Start/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..0c68a61
--- /dev/null
+++ b/Struts23-Start/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/Struts23-Start/.settings/org.eclipse.wst.common.component b/Struts23-Start/.settings/org.eclipse.wst.common.component
new file mode 100644
index 0000000..6438c0d
--- /dev/null
+++ b/Struts23-Start/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/Struts23-Start/.settings/org.eclipse.wst.common.project.facet.core.xml b/Struts23-Start/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..f8bc3b7
--- /dev/null
+++ b/Struts23-Start/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/Struts23-Start/.settings/org.eclipse.wst.jsdt.ui.superType.container b/Struts23-Start/.settings/org.eclipse.wst.jsdt.ui.superType.container
new file mode 100644
index 0000000..3bd5d0a
--- /dev/null
+++ b/Struts23-Start/.settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
diff --git a/Struts23-Start/.settings/org.eclipse.wst.jsdt.ui.superType.name b/Struts23-Start/.settings/org.eclipse.wst.jsdt.ui.superType.name
new file mode 100644
index 0000000..05bd71b
--- /dev/null
+++ b/Struts23-Start/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window
\ No newline at end of file
diff --git a/Struts23-Start/.tern-project b/Struts23-Start/.tern-project
new file mode 100644
index 0000000..f030bd1
--- /dev/null
+++ b/Struts23-Start/.tern-project
@@ -0,0 +1,17 @@
+{
+ "plugins": {
+ "guess-types": {
+
+ },
+ "outline": {
+
+ },
+ "angular": {
+
+ }
+ },
+ "libs": [
+ "ecma5",
+ "browser"
+ ]
+}
\ No newline at end of file
diff --git a/Struts23-Start/WebContent/META-INF/MANIFEST.MF b/Struts23-Start/WebContent/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..5e94951
--- /dev/null
+++ b/Struts23-Start/WebContent/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/Struts23-Start/WebContent/WEB-INF/lib/asm-3.3.jar b/Struts23-Start/WebContent/WEB-INF/lib/asm-3.3.jar
new file mode 100644
index 0000000..d44dfd8
Binary files /dev/null and b/Struts23-Start/WebContent/WEB-INF/lib/asm-3.3.jar differ
diff --git a/Struts23-Start/WebContent/WEB-INF/lib/asm-commons-3.3.jar b/Struts23-Start/WebContent/WEB-INF/lib/asm-commons-3.3.jar
new file mode 100644
index 0000000..e509842
Binary files /dev/null and b/Struts23-Start/WebContent/WEB-INF/lib/asm-commons-3.3.jar differ
diff --git a/Struts23-Start/WebContent/WEB-INF/lib/asm-tree-3.3.jar b/Struts23-Start/WebContent/WEB-INF/lib/asm-tree-3.3.jar
new file mode 100644
index 0000000..374bc2e
Binary files /dev/null and b/Struts23-Start/WebContent/WEB-INF/lib/asm-tree-3.3.jar differ
diff --git a/Struts23-Start/WebContent/WEB-INF/lib/commons-fileupload-1.3.2.jar b/Struts23-Start/WebContent/WEB-INF/lib/commons-fileupload-1.3.2.jar
new file mode 100644
index 0000000..4975590
Binary files /dev/null and b/Struts23-Start/WebContent/WEB-INF/lib/commons-fileupload-1.3.2.jar differ
diff --git a/Struts23-Start/WebContent/WEB-INF/lib/commons-io-2.2.jar b/Struts23-Start/WebContent/WEB-INF/lib/commons-io-2.2.jar
new file mode 100644
index 0000000..84ca565
Binary files /dev/null and b/Struts23-Start/WebContent/WEB-INF/lib/commons-io-2.2.jar differ
diff --git a/Struts23-Start/WebContent/WEB-INF/lib/commons-lang3-3.2.jar b/Struts23-Start/WebContent/WEB-INF/lib/commons-lang3-3.2.jar
new file mode 100644
index 0000000..a30d272
Binary files /dev/null and b/Struts23-Start/WebContent/WEB-INF/lib/commons-lang3-3.2.jar differ
diff --git a/Struts23-Start/WebContent/WEB-INF/lib/freemarker-2.3.22.jar b/Struts23-Start/WebContent/WEB-INF/lib/freemarker-2.3.22.jar
new file mode 100644
index 0000000..a67a1c1
Binary files /dev/null and b/Struts23-Start/WebContent/WEB-INF/lib/freemarker-2.3.22.jar differ
diff --git a/Struts23-Start/WebContent/WEB-INF/lib/javassist-3.11.0.GA.jar b/Struts23-Start/WebContent/WEB-INF/lib/javassist-3.11.0.GA.jar
new file mode 100644
index 0000000..b3bfeeb
Binary files /dev/null and b/Struts23-Start/WebContent/WEB-INF/lib/javassist-3.11.0.GA.jar differ
diff --git a/Struts23-Start/WebContent/WEB-INF/lib/log4j-1.2.17.jar b/Struts23-Start/WebContent/WEB-INF/lib/log4j-1.2.17.jar
new file mode 100644
index 0000000..068867e
Binary files /dev/null and b/Struts23-Start/WebContent/WEB-INF/lib/log4j-1.2.17.jar differ
diff --git a/Struts23-Start/WebContent/WEB-INF/lib/ognl-3.0.19.jar b/Struts23-Start/WebContent/WEB-INF/lib/ognl-3.0.19.jar
new file mode 100644
index 0000000..8f31612
Binary files /dev/null and b/Struts23-Start/WebContent/WEB-INF/lib/ognl-3.0.19.jar differ
diff --git a/Struts23-Start/WebContent/WEB-INF/lib/struts2-core-2.3.30.jar b/Struts23-Start/WebContent/WEB-INF/lib/struts2-core-2.3.30.jar
new file mode 100644
index 0000000..00d8c96
Binary files /dev/null and b/Struts23-Start/WebContent/WEB-INF/lib/struts2-core-2.3.30.jar differ
diff --git a/Struts23-Start/WebContent/WEB-INF/lib/xwork-core-2.3.30.jar b/Struts23-Start/WebContent/WEB-INF/lib/xwork-core-2.3.30.jar
new file mode 100644
index 0000000..f908ceb
Binary files /dev/null and b/Struts23-Start/WebContent/WEB-INF/lib/xwork-core-2.3.30.jar differ
diff --git a/Struts23-Start/WebContent/WEB-INF/web.xml b/Struts23-Start/WebContent/WEB-INF/web.xml
new file mode 100644
index 0000000..5c271ee
--- /dev/null
+++ b/Struts23-Start/WebContent/WEB-INF/web.xml
@@ -0,0 +1,16 @@
+
+
+ Struts23-Start
+
+
+ struts2
+ org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
+
+
+ struts2
+ /*
+
+
+ login/login.jsp
+
+
\ No newline at end of file
diff --git a/Struts23-Start/WebContent/login/error.jsp b/Struts23-Start/WebContent/login/error.jsp
new file mode 100644
index 0000000..a060152
--- /dev/null
+++ b/Struts23-Start/WebContent/login/error.jsp
@@ -0,0 +1,13 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+
+
+
+
+Insert title here
+
+
+ 用户名或密码输入错误。。。
+ 返回
+
+
\ No newline at end of file
diff --git a/Struts23-Start/WebContent/login/login.jsp b/Struts23-Start/WebContent/login/login.jsp
new file mode 100644
index 0000000..7d5b664
--- /dev/null
+++ b/Struts23-Start/WebContent/login/login.jsp
@@ -0,0 +1,29 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+ <%@taglib uri="/struts-tags" prefix="s"%>
+
+
+
+
+Insert title here
+
+
+
+
+
+ 用户:
+
+
+
+ 密码:
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Struts23-Start/WebContent/login/login2.jsp b/Struts23-Start/WebContent/login/login2.jsp
new file mode 100644
index 0000000..bd12020
--- /dev/null
+++ b/Struts23-Start/WebContent/login/login2.jsp
@@ -0,0 +1,29 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+ <%@taglib uri="/struts-tags" prefix="s"%>
+
+
+
+
+Insert title here
+
+
+
+
+
+ 用户:
+
+
+
+ 密码:
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Struts23-Start/WebContent/login/login3.jsp b/Struts23-Start/WebContent/login/login3.jsp
new file mode 100644
index 0000000..d8af065
--- /dev/null
+++ b/Struts23-Start/WebContent/login/login3.jsp
@@ -0,0 +1,29 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+ <%@taglib uri="/struts-tags" prefix="s"%>
+
+
+
+
+Insert title here
+
+
+
+
+
+ 用户:
+
+
+
+ 密码:
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Struts23-Start/WebContent/login/success.jsp b/Struts23-Start/WebContent/login/success.jsp
new file mode 100644
index 0000000..a290a8e
--- /dev/null
+++ b/Struts23-Start/WebContent/login/success.jsp
@@ -0,0 +1,22 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+
+
+
+
+login success
+
+
+
+
+ 用户:
+ ${username}
+
+
+ 密码:
+ ${password}
+
+
+ 返回 +
+
+
\ No newline at end of file
diff --git a/Struts23-Start/build/classes/com/gc/train/struts2/login/LoginAction.class b/Struts23-Start/build/classes/com/gc/train/struts2/login/LoginAction.class
new file mode 100644
index 0000000..ef29c67
Binary files /dev/null and b/Struts23-Start/build/classes/com/gc/train/struts2/login/LoginAction.class differ
diff --git a/Struts23-Start/build/classes/com/gc/train/struts2/login/LoginAction2.class b/Struts23-Start/build/classes/com/gc/train/struts2/login/LoginAction2.class
new file mode 100644
index 0000000..c0abf0e
Binary files /dev/null and b/Struts23-Start/build/classes/com/gc/train/struts2/login/LoginAction2.class differ
diff --git a/Struts23-Start/build/classes/com/gc/train/struts2/login/LoginAction3.class b/Struts23-Start/build/classes/com/gc/train/struts2/login/LoginAction3.class
new file mode 100644
index 0000000..05a2137
Binary files /dev/null and b/Struts23-Start/build/classes/com/gc/train/struts2/login/LoginAction3.class differ
diff --git a/Struts23-Start/build/classes/log4j.properties b/Struts23-Start/build/classes/log4j.properties
new file mode 100644
index 0000000..0c14c1a
--- /dev/null
+++ b/Struts23-Start/build/classes/log4j.properties
@@ -0,0 +1,27 @@
+ ### \u8bbe\u7f6e###
+log4j.rootLogger = debug,stdout,D,E
+
+### \u8f93\u51fa\u4fe1\u606f\u5230\u63a7\u5236\u62ac ###
+log4j.appender.stdout = org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Target = System.out
+log4j.appender.CONSOLE.Threshold = INFO
+log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern = [%-5p] %d{yyyy-MM-dd HH:mm:ss,SSS} method:%l%n%m%n
+
+### \u8f93\u51faDEBUG \u7ea7\u522b\u4ee5\u4e0a\u7684\u65e5\u5fd7\u5230=D://logs/log.log ###
+log4j.appender.D = org.apache.log4j.DailyRollingFileAppender
+log4j.appender.D.File = D://logs/log.log
+log4j.appender.D.DatePattern = '.'yyyy-MM-dd'.log'
+log4j.appender.D.Append = true
+log4j.appender.D.Threshold = DEBUG
+log4j.appender.D.layout = org.apache.log4j.PatternLayout
+log4j.appender.D.layout.ConversionPattern = [%-5p] %d{yyyy-MM-dd HH:mm:ss,SSS} method:%l%n%m%n
+
+### \u8f93\u51faERROR \u7ea7\u522b\u4ee5\u4e0a\u7684\u65e5\u5fd7\u5230=D://logs/error.log ###
+log4j.appender.E = org.apache.log4j.DailyRollingFileAppender
+log4j.appender.E.File =D://logs/error.log
+log4j.appender.E.DatePattern = '.'yyyy-MM-dd'.log'
+log4j.appender.E.Append = true
+log4j.appender.E.Threshold = ERROR
+log4j.appender.E.layout = org.apache.log4j.PatternLayout
+log4j.appender.E.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n
\ No newline at end of file
diff --git a/Struts23-Start/build/classes/struts.xml b/Struts23-Start/build/classes/struts.xml
new file mode 100644
index 0000000..e8821fd
--- /dev/null
+++ b/Struts23-Start/build/classes/struts.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+ /login/success.jsp
+ /login/error.jsp
+
+
+ /login/success.jsp
+ /login/error.jsp
+
+
+ /login/success.jsp
+ /login/error.jsp
+
+
+
+
\ No newline at end of file
diff --git a/Struts23-Start/src/com/gc/train/struts2/login/LoginAction.java b/Struts23-Start/src/com/gc/train/struts2/login/LoginAction.java
new file mode 100644
index 0000000..dbf54c1
--- /dev/null
+++ b/Struts23-Start/src/com/gc/train/struts2/login/LoginAction.java
@@ -0,0 +1,31 @@
+package com.gc.train.struts2.login;
+
+public class LoginAction {
+ 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;
+ }
+
+ private String username;
+ private String password;
+
+ public String execute()throws Exception{
+ if (this.getUsername().equals("admin")&&this.getPassword().equals("password")) {
+ return "success";
+ }
+ return "error";
+
+ }
+
+}
diff --git a/Struts23-Start/src/com/gc/train/struts2/login/LoginAction2.java b/Struts23-Start/src/com/gc/train/struts2/login/LoginAction2.java
new file mode 100644
index 0000000..7a17bae
--- /dev/null
+++ b/Struts23-Start/src/com/gc/train/struts2/login/LoginAction2.java
@@ -0,0 +1,31 @@
+package com.gc.train.struts2.login;
+
+public class LoginAction2 {
+ 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;
+ }
+
+ private String username;
+ private String password;
+
+ public String execute()throws Exception{
+ if (this.getUsername().equals("admin")&&this.getPassword().equals("password")) {
+ return "success";
+ }
+ return "error";
+
+ }
+
+}
diff --git a/Struts23-Start/src/com/gc/train/struts2/login/LoginAction3.java b/Struts23-Start/src/com/gc/train/struts2/login/LoginAction3.java
new file mode 100644
index 0000000..9aba9b8
--- /dev/null
+++ b/Struts23-Start/src/com/gc/train/struts2/login/LoginAction3.java
@@ -0,0 +1,31 @@
+package com.gc.train.struts2.login;
+
+public class LoginAction3 {
+ 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;
+ }
+
+ private String username;
+ private String password;
+
+ public String execute()throws Exception{
+ if (this.getUsername().equals("admin")&&this.getPassword().equals("password")) {
+ return "success";
+ }
+ return "error";
+
+ }
+
+}
diff --git a/Struts23-Start/src/log4j.properties b/Struts23-Start/src/log4j.properties
new file mode 100644
index 0000000..0c14c1a
--- /dev/null
+++ b/Struts23-Start/src/log4j.properties
@@ -0,0 +1,27 @@
+ ### \u8bbe\u7f6e###
+log4j.rootLogger = debug,stdout,D,E
+
+### \u8f93\u51fa\u4fe1\u606f\u5230\u63a7\u5236\u62ac ###
+log4j.appender.stdout = org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Target = System.out
+log4j.appender.CONSOLE.Threshold = INFO
+log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern = [%-5p] %d{yyyy-MM-dd HH:mm:ss,SSS} method:%l%n%m%n
+
+### \u8f93\u51faDEBUG \u7ea7\u522b\u4ee5\u4e0a\u7684\u65e5\u5fd7\u5230=D://logs/log.log ###
+log4j.appender.D = org.apache.log4j.DailyRollingFileAppender
+log4j.appender.D.File = D://logs/log.log
+log4j.appender.D.DatePattern = '.'yyyy-MM-dd'.log'
+log4j.appender.D.Append = true
+log4j.appender.D.Threshold = DEBUG
+log4j.appender.D.layout = org.apache.log4j.PatternLayout
+log4j.appender.D.layout.ConversionPattern = [%-5p] %d{yyyy-MM-dd HH:mm:ss,SSS} method:%l%n%m%n
+
+### \u8f93\u51faERROR \u7ea7\u522b\u4ee5\u4e0a\u7684\u65e5\u5fd7\u5230=D://logs/error.log ###
+log4j.appender.E = org.apache.log4j.DailyRollingFileAppender
+log4j.appender.E.File =D://logs/error.log
+log4j.appender.E.DatePattern = '.'yyyy-MM-dd'.log'
+log4j.appender.E.Append = true
+log4j.appender.E.Threshold = ERROR
+log4j.appender.E.layout = org.apache.log4j.PatternLayout
+log4j.appender.E.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n
\ No newline at end of file
diff --git a/Struts23-Start/src/struts.xml b/Struts23-Start/src/struts.xml
new file mode 100644
index 0000000..e8821fd
--- /dev/null
+++ b/Struts23-Start/src/struts.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+ /login/success.jsp
+ /login/error.jsp
+
+
+ /login/success.jsp
+ /login/error.jsp
+
+
+ /login/success.jsp
+ /login/error.jsp
+
+
+
+
\ No newline at end of file