diff --git a/org.springframework.samples.petclinic/src/main/java/org/springframework/samples/petclinic/web/ClinicController.java b/org.springframework.samples.petclinic/src/main/java/org/springframework/samples/petclinic/web/ClinicController.java index 667fb7e217..e93ae8f666 100644 --- a/org.springframework.samples.petclinic/src/main/java/org/springframework/samples/petclinic/web/ClinicController.java +++ b/org.springframework.samples.petclinic/src/main/java/org/springframework/samples/petclinic/web/ClinicController.java @@ -5,7 +5,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.samples.petclinic.Clinic; import org.springframework.samples.petclinic.Vets; import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; @@ -55,11 +54,10 @@ public class ClinicController { * @return a ModelMap with the model attributes for the view */ @RequestMapping("/vets") - public String vetsHandler(Model model) { + public ModelMap vetsHandler() { Vets vets = new Vets(); vets.getVetList().addAll(this.clinic.getVets()); - model.addAttribute(vets); - return "vets/list"; + return new ModelMap(vets); } /** diff --git a/org.springframework.samples.petclinic/src/main/webapp/WEB-INF/jsp/vets/list.jsp b/org.springframework.samples.petclinic/src/main/webapp/WEB-INF/jsp/vets.jsp similarity index 100% rename from org.springframework.samples.petclinic/src/main/webapp/WEB-INF/jsp/vets/list.jsp rename to org.springframework.samples.petclinic/src/main/webapp/WEB-INF/jsp/vets.jsp diff --git a/org.springframework.samples.petclinic/src/main/webapp/WEB-INF/petclinic-servlet.xml b/org.springframework.samples.petclinic/src/main/webapp/WEB-INF/petclinic-servlet.xml index cb5d19b1e7..3c05fc3000 100644 --- a/org.springframework.samples.petclinic/src/main/webapp/WEB-INF/petclinic-servlet.xml +++ b/org.springframework.samples.petclinic/src/main/webapp/WEB-INF/petclinic-servlet.xml @@ -61,8 +61,8 @@ - - + + diff --git a/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/DispatcherServlet.java b/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/DispatcherServlet.java index acb031e07d..4745d0b19c 100644 --- a/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/DispatcherServlet.java +++ b/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/DispatcherServlet.java @@ -741,7 +741,7 @@ public class DispatcherServlet extends FrameworkServlet { if (logger.isDebugEnabled()) { String requestUri = new UrlPathHelper().getRequestUri(request); logger.debug("DispatcherServlet with name '" + getServletName() + - "' processing request for [" + requestUri + "]"); + "' processing " + request.getMethod() + " request for [" + requestUri + "]"); } // Keep a snapshot of the request attributes in case of an include,