();
+ }
+ return vets;
+ }
+
+}
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 5dd5edf754..c11853091b 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
@@ -3,6 +3,7 @@ package org.springframework.samples.petclinic.web;
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.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
@@ -53,7 +54,9 @@ public class ClinicController {
*/
@RequestMapping("/vets")
public ModelMap vetsHandler() {
- return new ModelMap(this.clinic.getVets());
+ Vets vets = new Vets();
+ vets.getVetList().addAll(this.clinic.getVets());
+ return new ModelMap(vets);
}
/**
diff --git a/org.springframework.samples.petclinic/src/main/webapp/WEB-INF/jsp/owner.jsp b/org.springframework.samples.petclinic/src/main/webapp/WEB-INF/jsp/owner.jsp
index 1a8432124e..5401842193 100644
--- a/org.springframework.samples.petclinic/src/main/webapp/WEB-INF/jsp/owner.jsp
+++ b/org.springframework.samples.petclinic/src/main/webapp/WEB-INF/jsp/owner.jsp
@@ -96,7 +96,7 @@
|
-
+
diff --git a/org.springframework.samples.petclinic/src/main/webapp/WEB-INF/jsp/vets.jsp b/org.springframework.samples.petclinic/src/main/webapp/WEB-INF/jsp/vets.jsp
index 2ee6d20b71..fde93bb355 100644
--- a/org.springframework.samples.petclinic/src/main/webapp/WEB-INF/jsp/vets.jsp
+++ b/org.springframework.samples.petclinic/src/main/webapp/WEB-INF/jsp/vets.jsp
@@ -10,7 +10,7 @@
Specialties |
-
+
${vet.firstName} ${vet.lastName} |
@@ -22,5 +22,12 @@
|
+
<%@ include file="/WEB-INF/jsp/footer.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 77798e75a0..592011f1c6 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
@@ -4,8 +4,10 @@
-->
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
+ http://www.springframework.org/schema/oxm http://www.springframework.org/schema/oxm/spring-oxm-3.0.xsd">
-
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
|