Add form tag example

This commit is contained in:
Ivan
2016-03-04 14:49:55 +01:00
parent 09d9cf26b4
commit ecc6625017
5 changed files with 42 additions and 42 deletions
@@ -24,7 +24,7 @@
<h3>Welcome, Enter The Person Details</h3>
<form:form method="POST" action="/spring-mvc-xml/addPerson" modelAttribute="person" enctype="multipart/form-data">
<form:form method="POST" action="/spring-mvc-xml/addPerson" modelAttribute="person">
<form:errors path="*" cssClass="errorbox" element="div" />
@@ -104,10 +104,6 @@
<td><form:label path="notes">Notes</form:label></td>
<td><form:textarea path="notes" rows="3" cols="20"/></td>
</tr>
<tr>
<td><form:label path="file">Select a file to upload</form:label></td>
<td><input type="file" name="file" /></td>
</tr>
<tr>
<td><form:hidden path="id" value="12345"/></td>
</tr>
@@ -61,20 +61,5 @@
<td>${person.notes}</td>
</tr>
</table>
<h2>Submitted File</h2>
<table>
<tr>
<td>OriginalFileName :</td>
<td>${person.file.originalFilename}</td>
</tr>
<tr>
<td>Type :</td>
<td>${person.file.contentType}</td>
</tr>
</table>
</body>
</html>
@@ -29,7 +29,7 @@
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<multipart-config>
<location>/tmp</location>
<location>C:/Users/ivan/Desktop/tmp</location>
</multipart-config>
</servlet>
<servlet-mapping>