From f7498c79df1ce585d4025f3f64d34d205143c868 Mon Sep 17 00:00:00 2001 From: Tomas Repel Date: Fri, 2 Oct 2015 11:33:57 +0200 Subject: [PATCH] Removed HTTP PUT method - it is not supported in JSP 2.3 --- .../samples/petclinic/web/OwnerController.java | 2 +- .../samples/petclinic/web/PetController.java | 2 +- .../WEB-INF/jsp/owners/createOrUpdateOwnerForm.jsp | 6 +----- .../WEB-INF/jsp/pets/createOrUpdatePetForm.jsp | 10 +--------- src/main/webapp/WEB-INF/web.xml | 13 ------------- 5 files changed, 4 insertions(+), 29 deletions(-) diff --git a/src/main/java/org/springframework/samples/petclinic/web/OwnerController.java b/src/main/java/org/springframework/samples/petclinic/web/OwnerController.java index ecbbce55906..9f2ffb05cb7 100644 --- a/src/main/java/org/springframework/samples/petclinic/web/OwnerController.java +++ b/src/main/java/org/springframework/samples/petclinic/web/OwnerController.java @@ -116,7 +116,7 @@ public String initUpdateOwnerForm(@PathVariable("ownerId") int ownerId, Model mo return "owners/createOrUpdateOwnerForm"; } - @RequestMapping(value = "/owners/{ownerId}/edit", method = RequestMethod.PUT) + @RequestMapping(value = "/owners/{ownerId}/edit", method = RequestMethod.POST) public String processUpdateOwnerForm(@Valid Owner owner, BindingResult result, SessionStatus status) { if (result.hasErrors()) { return "owners/createOrUpdateOwnerForm"; diff --git a/src/main/java/org/springframework/samples/petclinic/web/PetController.java b/src/main/java/org/springframework/samples/petclinic/web/PetController.java index bf823023e2f..9fdae6855c8 100644 --- a/src/main/java/org/springframework/samples/petclinic/web/PetController.java +++ b/src/main/java/org/springframework/samples/petclinic/web/PetController.java @@ -91,7 +91,7 @@ public String initUpdateForm(@PathVariable("petId") int petId, Map
- - - -

New Owner

- + diff --git a/src/main/webapp/WEB-INF/jsp/pets/createOrUpdatePetForm.jsp b/src/main/webapp/WEB-INF/jsp/pets/createOrUpdatePetForm.jsp index c41f02ddf7c..a3d144135df 100644 --- a/src/main/webapp/WEB-INF/jsp/pets/createOrUpdatePetForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/pets/createOrUpdatePetForm.jsp @@ -18,21 +18,13 @@
- - - - - - - -

New Pet

-
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index bd3ea6d4ad5..7bb52a0c191 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -98,19 +98,6 @@ /* - - - httpMethodFilter - org.springframework.web.filter.HiddenHttpMethodFilter - - - - httpMethodFilter - petclinic - - datatables