1

我如何使用 java 1.4(没有注释)在 spring 2.5 中处理多部分文件上传?

我需要处理请求

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>
4

1 回答 1

1

在此处查看此示例: http : //www.mkyong.com/spring-mvc/spring-mvc-file-upload-example/ 并将 Java1.5 依赖项转换为 Java 1.4

于 2013-05-09T11:18:48.090 回答