Remove file upload handling from example for Spring MVC form taglib
This commit is contained in:
parent
c0ffd1e4bf
commit
365ec16879
|
@ -24,12 +24,5 @@
|
|||
<bean class="org.springframework.context.support.ResourceBundleMessageSource" id="messageSource">
|
||||
<property name="basename" value="messages" />
|
||||
</bean>
|
||||
|
||||
<!-- <bean id="multipartResolver"
|
||||
class="org.springframework.web.multipart.commons.CommonsMultipartResolver" /> -->
|
||||
|
||||
<bean id="multipartResolver"
|
||||
class="org.springframework.web.multipart.support.StandardServletMultipartResolver">
|
||||
</bean>
|
||||
|
||||
</beans>
|
|
@ -22,9 +22,9 @@
|
|||
|
||||
<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" />
|
||||
|
||||
|
@ -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>
|
||||
|
|
|
@ -62,19 +62,5 @@
|
|||
</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>
|
|
@ -28,9 +28,6 @@
|
|||
<servlet-name>mvc</servlet-name>
|
||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
<multipart-config>
|
||||
<location>/tmp</location>
|
||||
</multipart-config>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>mvc</servlet-name>
|
||||
|
|
Loading…
Reference in New Issue