From bda2923a84dba85dced310b418b212d73309afe7 Mon Sep 17 00:00:00 2001 From: eugenp Date: Sun, 20 Jul 2014 00:49:02 +0300 Subject: [PATCH] removing spring forms project --- .../WebContent/META-INF/MANIFEST.MF | 3 -- .../WebContent/WEB-INF/dispatcher-servlet.xml | 27 ------------- .../WEB-INF/views/employeeAdded.jsp | 24 ------------ .../WebContent/WEB-INF/views/employeeHome.jsp | 38 ------------------- .../WebContent/WEB-INF/views/error.jsp | 20 ---------- spring-mvc-forms/WebContent/WEB-INF/web.xml | 19 ---------- spring-mvc-forms/WebContent/index.jsp | 18 --------- .../demo/controllers/EmployeeController.java | 33 ---------------- .../src/com/demo/form/Employee.java | 33 ---------------- 9 files changed, 215 deletions(-) delete mode 100644 spring-mvc-forms/WebContent/META-INF/MANIFEST.MF delete mode 100644 spring-mvc-forms/WebContent/WEB-INF/dispatcher-servlet.xml delete mode 100644 spring-mvc-forms/WebContent/WEB-INF/views/employeeAdded.jsp delete mode 100644 spring-mvc-forms/WebContent/WEB-INF/views/employeeHome.jsp delete mode 100644 spring-mvc-forms/WebContent/WEB-INF/views/error.jsp delete mode 100644 spring-mvc-forms/WebContent/WEB-INF/web.xml delete mode 100644 spring-mvc-forms/WebContent/index.jsp delete mode 100644 spring-mvc-forms/src/com/demo/controllers/EmployeeController.java delete mode 100644 spring-mvc-forms/src/com/demo/form/Employee.java diff --git a/spring-mvc-forms/WebContent/META-INF/MANIFEST.MF b/spring-mvc-forms/WebContent/META-INF/MANIFEST.MF deleted file mode 100644 index 254272e1c0..0000000000 --- a/spring-mvc-forms/WebContent/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Class-Path: - diff --git a/spring-mvc-forms/WebContent/WEB-INF/dispatcher-servlet.xml b/spring-mvc-forms/WebContent/WEB-INF/dispatcher-servlet.xml deleted file mode 100644 index 1fc94effba..0000000000 --- a/spring-mvc-forms/WebContent/WEB-INF/dispatcher-servlet.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - /WEB-INF/views/ - - - .jsp - - - - \ No newline at end of file diff --git a/spring-mvc-forms/WebContent/WEB-INF/views/employeeAdded.jsp b/spring-mvc-forms/WebContent/WEB-INF/views/employeeAdded.jsp deleted file mode 100644 index 1457bc5fc8..0000000000 --- a/spring-mvc-forms/WebContent/WEB-INF/views/employeeAdded.jsp +++ /dev/null @@ -1,24 +0,0 @@ -<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%> - - -Spring MVC Form Handling - - - -

Submitted Employee Information

- - - - - - - - - - - - - -
Name :${name}
ID :${id}
Contact Number :${contactNumber}
- - \ No newline at end of file diff --git a/spring-mvc-forms/WebContent/WEB-INF/views/employeeHome.jsp b/spring-mvc-forms/WebContent/WEB-INF/views/employeeHome.jsp deleted file mode 100644 index 497eade8c7..0000000000 --- a/spring-mvc-forms/WebContent/WEB-INF/views/employeeHome.jsp +++ /dev/null @@ -1,38 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> -<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> - - - - - -SpringMVCExample - - - -

Welcome, Enter The Employee Details

- - - - - - - - - - - - - - - - - - -
Name
Id
Contact Number
-
- - - - \ No newline at end of file diff --git a/spring-mvc-forms/WebContent/WEB-INF/views/error.jsp b/spring-mvc-forms/WebContent/WEB-INF/views/error.jsp deleted file mode 100644 index 8f3d83af17..0000000000 --- a/spring-mvc-forms/WebContent/WEB-INF/views/error.jsp +++ /dev/null @@ -1,20 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> - - - - -SpringMVCExample - - - -

Pleas enter the correct details

- - - - -
Retry
- - - - \ No newline at end of file diff --git a/spring-mvc-forms/WebContent/WEB-INF/web.xml b/spring-mvc-forms/WebContent/WEB-INF/web.xml deleted file mode 100644 index 4c122670e5..0000000000 --- a/spring-mvc-forms/WebContent/WEB-INF/web.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - SpringMVCFormExample - - dispatcher - org.springframework.web.servlet.DispatcherServlet - - 1 - - - dispatcher - / - - - index.jsp - - \ No newline at end of file diff --git a/spring-mvc-forms/WebContent/index.jsp b/spring-mvc-forms/WebContent/index.jsp deleted file mode 100644 index 1ecfcec9d7..0000000000 --- a/spring-mvc-forms/WebContent/index.jsp +++ /dev/null @@ -1,18 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> - - - - -Spring MVC Examples - - - -

Spring MVC Examples

- - - - \ No newline at end of file diff --git a/spring-mvc-forms/src/com/demo/controllers/EmployeeController.java b/spring-mvc-forms/src/com/demo/controllers/EmployeeController.java deleted file mode 100644 index 1dd76ae23f..0000000000 --- a/spring-mvc-forms/src/com/demo/controllers/EmployeeController.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.demo.controllers; - -import javax.validation.Valid; - -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.validation.BindingResult; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.servlet.ModelAndView; - -import com.demo.form.Employee; - -@Controller -public class EmployeeController { - - @RequestMapping(value = "/employee", method = RequestMethod.GET) - public ModelAndView showForm() { - return new ModelAndView("employeeHome", "employee", new Employee()); - } - - @RequestMapping(value = "/addEmployee", method = RequestMethod.POST) - public String submit(@Valid @ModelAttribute("employee") Employee employee, BindingResult result, ModelMap model) { - if (result.hasErrors()) { - return "error"; - } - model.addAttribute("name", employee.getName()); - model.addAttribute("contactNumber", employee.getContactNumber()); - model.addAttribute("id", employee.getId()); - return "employeeAdded"; - } -} diff --git a/spring-mvc-forms/src/com/demo/form/Employee.java b/spring-mvc-forms/src/com/demo/form/Employee.java deleted file mode 100644 index 569347b628..0000000000 --- a/spring-mvc-forms/src/com/demo/form/Employee.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.demo.form; - -public class Employee { - - private String name; - private long id; - private String contactNumber; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public long getId() { - return id; - } - - public void setId(long id) { - this.id = id; - } - - public String getContactNumber() { - return contactNumber; - } - - public void setContactNumber(String contactNumber) { - this.contactNumber = contactNumber; - } - -}