Follow the steps below to create a file upload form using a
web application that includes HTML and JSP. In this form we must use the POST()
method and not the GET() method. The form action attribute should be set to a
JSP file that will handle the uploading process.
To upload a single file
you should use a single <input .../> tag with attribute
type="file". To allow multiple files uploading, include more than one
input tags with different values for the name attribute. The browser associates
a Browse button with each of them.
Below is the coding for the HTML file
<html>
<head>
<title>File Uploading Form</title>
</head>
<body>
<h3>File Upload by CodeMonkeyy</h3>
Select a file to upload: <br />
<form action="FileUpload" method="post"
enctype="multipart/form-data">
<input type="file" name="file" size="50" />
<br />
<input type="submit" value="Upload File" />
</form>
</body>
</html>