jsp实现文件上传控件的应用代码实例

html

    <html>
        <head>
            <title>uploading files</title>
        </head>
    
        <body>
            <form action="basic.jsp教程" method="post">
                <input type="file" name="filer">
                <br>
                <input type="submit" value="submit">
            </form>
        </body>
    </html>

jsp文件

    <html>
        <head>
            <title>uploading files</title>
        </head>

        <body>
            <h1>uploading files</h1>
            file name:
            <%= request.getparameter("filer") %>
        </body>
    </html>


xml文档

    <?xml version="1.0" encoding="iso-8859-1"?>
    <!-- edited with xml spy v4.4 u (http://www.3ppt.com) by nick todd (conygre it limited) -->
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/j2ee
             http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
    </web-app>


你可能感兴趣的:(html,jsp,xml)