Reputation: 1671
How do i handle multipart file upload in spring 2.5 with java 1.4 (with out anotation)?
I need to handle the request in
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
}
/////
<form action="tradeshowinfo.htm?type=save" method="post" enctype="multipart/form-data">
<table>
<tr>
<td>
Event Start Date:
</td>
</tr>
<tr>
<td>
<input type="text" name="eventStart" id="eventStart"/>
</td>
</tr>
<tr>
<td>
Event End Date:
</td>
</tr>
<tr>
<td>
<input type="text" name="eventEnd" id="eventEnd"/>
</td>
</tr>
<tr>
<td>
Location:
</td>
</tr>
<tr>
<td>
<input type="text" name="location"/>
</td>
</tr>
<tr>
<td>
Description:
</td>
</tr>
<tr>
<td>
<textarea type="text" name="description"> </textarea>
</td>
</tr>
<tr>
<td>
Image:
</td>
</tr>
<tr>
<td>
<input type="file" name="image"/>
</td>
</tr>
<tr>
<td>
Link:
</td>
</tr>
<tr>
<td>
<textarea type="text" name="url"> </textarea>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
<input type="submit" name="submit" value="Create">
</td>
</tr>
</table>
Upvotes: 1
Views: 1917
Reputation: 1677
Check this example here : http://www.mkyong.com/spring-mvc/spring-mvc-file-upload-example/ and convert Java1.5 dependencies to Java 1.4
Upvotes: 1