Remove file upload handling from example for Spring MVC form taglib
This commit is contained in:
parent
c0ffd1e4bf
commit
365ec16879
|
@ -25,11 +25,4 @@
|
||||||
<property name="basename" value="messages" />
|
<property name="basename" value="messages" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<!-- <bean id="multipartResolver"
|
|
||||||
class="org.springframework.web.multipart.commons.CommonsMultipartResolver" /> -->
|
|
||||||
|
|
||||||
<bean id="multipartResolver"
|
|
||||||
class="org.springframework.web.multipart.support.StandardServletMultipartResolver">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
</beans>
|
</beans>
|
|
@ -22,9 +22,9 @@
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<h3>Welcome, Enter The Person Details</h3>
|
<h3>Welcome, Enter the Person Details</h3>
|
||||||
|
|
||||||
<form:form method="POST" action="addPerson" modelAttribute="person" enctype="multipart/form-data">
|
<form:form method="POST" action="addPerson" modelAttribute="person">
|
||||||
|
|
||||||
<form:errors path="*" cssClass="errorbox" element="div" />
|
<form:errors path="*" cssClass="errorbox" element="div" />
|
||||||
|
|
||||||
|
@ -104,10 +104,6 @@
|
||||||
<td><form:label path="notes">Notes</form:label></td>
|
<td><form:label path="notes">Notes</form:label></td>
|
||||||
<td><form:textarea path="notes" rows="3" cols="20"/></td>
|
<td><form:textarea path="notes" rows="3" cols="20"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td><form:label path="file">Select a file to upload</form:label></td>
|
|
||||||
<td><input type="file" name="file" /></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><form:hidden path="id" value="12345"/></td>
|
<td><form:hidden path="id" value="12345"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -62,19 +62,5 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</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>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -28,9 +28,6 @@
|
||||||
<servlet-name>mvc</servlet-name>
|
<servlet-name>mvc</servlet-name>
|
||||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
||||||
<load-on-startup>1</load-on-startup>
|
<load-on-startup>1</load-on-startup>
|
||||||
<multipart-config>
|
|
||||||
<location>/tmp</location>
|
|
||||||
</multipart-config>
|
|
||||||
</servlet>
|
</servlet>
|
||||||
<servlet-mapping>
|
<servlet-mapping>
|
||||||
<servlet-name>mvc</servlet-name>
|
<servlet-name>mvc</servlet-name>
|
||||||
|
|
Loading…
Reference in New Issue