Browse Source
* Eliminated redundant 'clinic' servlet mapping (was: http://localhost:8080/petclinic/clinic/owners; now: http://localhost:8080/petclinic/owners) * A parameterless GET for /owners now returns the list of all owners, rather than an error. * /owners/form is now /owners/search (distinguishes the 'search form' resource from the 'edit owner form' resource) * Eliminated any need for redirects, <welcome-file-list/>, and index.jsp. Deleted all of them. * Updated /owners/{oid}/edit to submit using PUT instead of POST * Updated URI for edit pet form from /owners/{oid}/pets/{pid} to /owners/{oid}/pets/{pid}/edit (the edit form is a distinct resource) * Updated /owners/{oid}/pets/{pid}/edit to submit using PUT instead of POST Changes unrelated to the web interface: * Partitioned up JSPs into new owners, pets, and vets folders. * Renamed those JSPs, e.g. ownerForm.jsp -> owners/form.jsp; findOwners.jsp -> owners/search.jsp; owners.jsp -> owners/list.jsp * Updated various controllers to respect the changes to the URI templates, etc. * Updated .classpath to include all necessary projects and libs to run the webapp successfully in WTP * Updated JSP error checking rules to relax validation of fragments like header.jsp and footer.jsp git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@635 50f2f4bb-b051-0410-bef5-90022cba6387pull/1/head
23 changed files with 89 additions and 57 deletions
@ -1,3 +1,4 @@
@@ -1,3 +1,4 @@
|
||||
#Fri Nov 21 08:19:32 EST 2008 |
||||
#Fri Feb 13 19:16:19 PST 2009 |
||||
classpath.helper/org.eclipse.jdt.launching.JRE_CONTAINER\:\:org.eclipse.jdt.internal.launching.macosx.MacOSXType\:\:JVM\ 1.6.0/owners=jst.java\:5.0 |
||||
classpath.helper/org.eclipse.jst.server.core.container\:\:com.springsource.server.ide.server.core.runtime.classpath\:\:SpringSource\ dm\ Server\ (Runtime)\ v1.0/owners=jst.web\:2.4 |
||||
eclipse.preferences.version=1 |
||||
|
||||
@ -1,9 +1,12 @@
@@ -1,9 +1,12 @@
|
||||
<%@ include file="/WEB-INF/jsp/includes.jsp" %> |
||||
<%@ include file="/WEB-INF/jsp/header.jsp" %> |
||||
<c:choose> |
||||
<c:when test="${owner.new}"><c:set var="method" value="post"/></c:when> |
||||
<c:otherwise><c:set var="method" value="put"/></c:otherwise> |
||||
</c:choose> |
||||
|
||||
<h2><c:if test="${owner.new}">New </c:if>Owner:</h2> |
||||
|
||||
<form:form modelAttribute="owner"> |
||||
<form:form modelAttribute="owner" method="${method}"> |
||||
<table> |
||||
<tr> |
||||
<th> |
||||
@ -1,12 +1,15 @@
@@ -1,12 +1,15 @@
|
||||
<%@ include file="/WEB-INF/jsp/includes.jsp" %> |
||||
<%@ include file="/WEB-INF/jsp/header.jsp" %> |
||||
<c:choose> |
||||
<c:when test="${pet.new}"><c:set var="method" value="post"/></c:when> |
||||
<c:otherwise><c:set var="method" value="put"/></c:otherwise> |
||||
</c:choose> |
||||
|
||||
<h2><c:if test="${pet.new}">New </c:if>Pet</h2> |
||||
|
||||
<b>Owner:</b> ${pet.owner.firstName} ${pet.owner.lastName} |
||||
<br/> |
||||
|
||||
<form:form modelAttribute="pet"> |
||||
<form:form modelAttribute="pet" method="${method}"> |
||||
<table> |
||||
<tr> |
||||
<th> |
||||
Loading…
Reference in new issue