Java/JSP/Uploading Files

Материал из Java эксперт
Перейти к: навигация, поиск

Uploading Files in JSP

<HTML>
    <HEAD>
        <TITLE>Uploading Files</TITLE>
    </HEAD>
 
    <BODY>
        <FORM ACTION="formAction.jsp" METHOD="POST">
            <INPUT TYPE="FILE" NAME="filer">
            <BR>
            <INPUT TYPE="SUBMIT" VALUE="Submit">
        </FORM>
    </BODY>
</HTML>
///////////////////////////////////////////////////////////////////////
//File: formAction.jsp
<HTML>
    <HEAD>
        <TITLE>Uploading Files</TITLE>
    </HEAD>
    <BODY>
        <H1>Uploading Files</H1>
        File name: 
        <%= request.getParameter("filer") %>
    </BODY>
</HTML>