Can I use HTTP to upload a file to a web server?
Yes, you can upload a file using HTTP, but you need to write a servlet or a CGI script or some other server-side executable to receive the incoming file.
To send the file, create an HTML form for the client to use. Your form field should have input type "file" to let the user browse and select the file to be uploaded. Also, your form tag should have the "enctype=multipart/form-data" attribute in order to successfully pass file's contents to web server using HTTP. For example, the HTML form tag might look like this:
<FORM method="POST" action="someservlet" enctype="multipart/form-data"> form fields <INPUT type="file" name="file1"> </FORM>You can get further information regarding processing HTML forms from: http://www.w3.org/TR/WD-html40-970708/interact/forms.html