This example displays a form that demonstrates the use of multi-part forms
and file uploads.
The user should enter values into the fields, then select one or two file(s)
to upload and finally press ok.
Requires that iws_dir/classes/optional.jar be
present in the CLASSPATH.
This example uses fileuploadform.html input form and
FileUploadServlet servlet to display any submitted values. The
FileUploadServlet servlet uses iws_dir/samples/upload
directory to store all files uploaded and limits the total number of bytes
posted to 1024 KB.
Optionally this servlet uses max_content_length initialization
parameter to specify the number of bytes to limit the file being uploaded to.
1048576 is the default. -1 can be used to specify unlimited
length.
[ view source ]
[ run ]
|