@@ -67,13 +67,13 @@ The XML counterpart using the MVC namespace is:
6767[source,xml,indent=0]
6868[subs="verbatim,quotes"]
6969----
70- <mvc:annotation-driven />
70+ <mvc:annotation-driven/>
7171
7272 <mvc:view-resolvers>
73- <mvc:groovy />
73+ <mvc:groovy/>
7474 </mvc:view-resolvers>
7575
76- <mvc:groovy-configurer resource-loader-path="/WEB-INF/" />
76+ <mvc:groovy-configurer resource-loader-path="/WEB-INF/"/>
7777----
7878
7979[[view-groovymarkup-example]]
@@ -311,7 +311,7 @@ configured earlier;
311311 #springBind( "command.name" )
312312 <input type="text"
313313 name="${status.expression}"
314- value="$!status.value" /><br>
314+ value="$!status.value"/><br>
315315 #foreach($error in $status.errorMessages) <b>$error</b> <br> #end
316316 <br>
317317 ...
@@ -326,15 +326,15 @@ configured earlier;
326326----
327327 <!-- freemarker macros have to be imported into a namespace. We strongly
328328 recommend sticking to 'spring' -->
329- <#import "/spring.ftl" as spring />
329+ <#import "/spring.ftl" as spring/>
330330 <html>
331331 ...
332332 <form action="" method="POST">
333333 Name:
334- <@spring.bind "command.name" />
334+ <@spring.bind "command.name"/>
335335 <input type="text"
336336 name="${spring.status.expression}"
337- value="${spring.status.value?default("")}" /><br>
337+ value="${spring.status.value?default("")}"/><br>
338338 <#list spring.status.errorMessages as error> <b>${error}</b> <br> </#list>
339339 <br>
340340 ...
@@ -537,7 +537,7 @@ model under the name 'cityMap'.
537537----
538538 ...
539539 Town:
540- <@spring.formRadioButtons "command.address.town", cityMap, "" /><br><br>
540+ <@spring.formRadioButtons "command.address.town", cityMap, ""/><br><br>
541541----
542542
543543This renders a line of radio buttons, one for each value in `cityMap` using the
@@ -622,7 +622,7 @@ In similar fashion, HTML escaping can be specified per field:
622622
623623 <#assign htmlEscape = true in spring>
624624 <#-- next field will use HTML escaping -->
625- <@spring.formInput "command.name" />
625+ <@spring.formInput "command.name"/>
626626
627627 <#assign htmlEscape = false in spring>
628628 <#-- all future fields will be bound with HTML escaping off -->
@@ -768,15 +768,15 @@ look like:
768768 <table>
769769 <tr>
770770 <td>First Name:</td>
771- <td><form:input path="firstName" /></td>
771+ <td><form:input path="firstName"/></td>
772772 </tr>
773773 <tr>
774774 <td>Last Name:</td>
775- <td><form:input path="lastName" /></td>
775+ <td><form:input path="lastName"/></td>
776776 </tr>
777777 <tr>
778778 <td colspan="2">
779- <input type="submit" value="Save Changes" />
779+ <input type="submit" value="Save Changes"/>
780780 </td>
781781 </tr>
782782 </table>
@@ -804,7 +804,7 @@ The generated HTML looks like a standard form:
804804 </tr>
805805 <tr>
806806 <td colspan="2">
807- <input type="submit" value="Save Changes" />
807+ <input type="submit" value="Save Changes"/>
808808 </td>
809809 </tr>
810810 </table>
@@ -822,15 +822,15 @@ The preceding JSP assumes that the variable name of the form backing object is
822822 <table>
823823 <tr>
824824 <td>First Name:</td>
825- <td><form:input path="firstName" /></td>
825+ <td><form:input path="firstName"/></td>
826826 </tr>
827827 <tr>
828828 <td>Last Name:</td>
829- <td><form:input path="lastName" /></td>
829+ <td><form:input path="lastName"/></td>
830830 </tr>
831831 <tr>
832832 <td colspan="2">
833- <input type="submit" value="Save Changes" />
833+ <input type="submit" value="Save Changes"/>
834834 </td>
835835 </tr>
836836 </table>
@@ -1055,7 +1055,7 @@ This tag renders an HTML 'input' tag with type 'password' using the bound value.
10551055 <tr>
10561056 <td>Password:</td>
10571057 <td>
1058- <form:password path="password" />
1058+ <form:password path="password"/>
10591059 </td>
10601060 </tr>
10611061----
@@ -1070,7 +1070,7 @@ true, like so.
10701070 <tr>
10711071 <td>Password:</td>
10721072 <td>
1073- <form:password path="password" value="^76525bvHGq" showPassword="true" />
1073+ <form:password path="password" value="^76525bvHGq" showPassword="true"/>
10741074 </td>
10751075 </tr>
10761076----
@@ -1206,7 +1206,7 @@ happen to be specified as well, the item value property will apply to the map ke
12061206the item label property will apply to the map value.
12071207
12081208
1209- [[view-jsp-formtaglib-textAreatag ]]
1209+ [[view-jsp-formtaglib-textareatag ]]
12101210==== The textarea tag
12111211
12121212This tag renders an HTML 'textarea'.
@@ -1216,8 +1216,8 @@ This tag renders an HTML 'textarea'.
12161216----
12171217 <tr>
12181218 <td>Notes:</td>
1219- <td><form:textarea path="notes" rows="3" cols="20" /></td>
1220- <td><form:errors path="notes" /></td>
1219+ <td><form:textarea path="notes" rows="3" cols="20"/></td>
1220+ <td><form:errors path="notes"/></td>
12211221 </tr>
12221222----
12231223
@@ -1231,7 +1231,7 @@ an unbound hidden value, use the HTML `input` tag with type 'hidden'.
12311231[source,xml,indent=0]
12321232[subs="verbatim,quotes"]
12331233----
1234- <form:hidden path="house" />
1234+ <form:hidden path="house"/>
12351235
12361236----
12371237
@@ -1281,20 +1281,20 @@ The `form.jsp` would look like:
12811281 <table>
12821282 <tr>
12831283 <td>First Name:</td>
1284- <td><form:input path="firstName" /></td>
1284+ <td><form:input path="firstName"/></td>
12851285 <%-- Show errors for firstName field --%>
1286- <td><form:errors path="firstName" /></td>
1286+ <td><form:errors path="firstName"/></td>
12871287 </tr>
12881288
12891289 <tr>
12901290 <td>Last Name:</td>
1291- <td><form:input path="lastName" /></td>
1291+ <td><form:input path="lastName"/></td>
12921292 <%-- Show errors for lastName field --%>
1293- <td><form:errors path="lastName" /></td>
1293+ <td><form:errors path="lastName"/></td>
12941294 </tr>
12951295 <tr>
12961296 <td colspan="3">
1297- <input type="submit" value="Save Changes" />
1297+ <input type="submit" value="Save Changes"/>
12981298 </td>
12991299 </tr>
13001300 </table>
@@ -1324,7 +1324,7 @@ what the HTML would look like:
13241324 </tr>
13251325 <tr>
13261326 <td colspan="3">
1327- <input type="submit" value="Save Changes" />
1327+ <input type="submit" value="Save Changes"/>
13281328 </td>
13291329 </tr>
13301330 </table>
@@ -1345,21 +1345,21 @@ field-specific errors next to the fields:
13451345[subs="verbatim,quotes"]
13461346----
13471347 <form:form>
1348- <form:errors path="*" cssClass="errorBox" />
1348+ <form:errors path="*" cssClass="errorBox"/>
13491349 <table>
13501350 <tr>
13511351 <td>First Name:</td>
1352- <td><form:input path="firstName" /></td>
1353- <td><form:errors path="firstName" /></td>
1352+ <td><form:input path="firstName"/></td>
1353+ <td><form:errors path="firstName"/></td>
13541354 </tr>
13551355 <tr>
13561356 <td>Last Name:</td>
1357- <td><form:input path="lastName" /></td>
1358- <td><form:errors path="lastName" /></td>
1357+ <td><form:input path="lastName"/></td>
1358+ <td><form:errors path="lastName"/></td>
13591359 </tr>
13601360 <tr>
13611361 <td colspan="3">
1362- <input type="submit" value="Save Changes" />
1362+ <input type="submit" value="Save Changes"/>
13631363 </td>
13641364 </tr>
13651365 </table>
@@ -1387,7 +1387,7 @@ The HTML would look like:
13871387 </tr>
13881388 <tr>
13891389 <td colspan="3">
1390- <input type="submit" value="Save Changes" />
1390+ <input type="submit" value="Save Changes"/>
13911391 </td>
13921392 </tr>
13931393 </form>
@@ -1543,14 +1543,14 @@ The XML counterpart using MVC namespace is:
15431543[source,xml,indent=0]
15441544[subs="verbatim,quotes"]
15451545----
1546- <mvc:annotation-driven />
1546+ <mvc:annotation-driven/>
15471547
15481548 <mvc:view-resolvers>
1549- <mvc:script-template />
1549+ <mvc:script-template/>
15501550 </mvc:view-resolvers>
15511551
15521552 <mvc:script-template-configurer engine-name="nashorn" render-object="Mustache" render-function="render">
1553- <mvc:script location="mustache.js" />
1553+ <mvc:script location="mustache.js"/>
15541554 </mvc:script-template-configurer>
15551555----
15561556
0 commit comments