Originally posted by ramprasad madathil:
As far as I know, reading in files over a web request is not that straight forward. This is so because the request contains additional information (like content-length, encoding etc) and the entire information (including the actual data stream) is available as one big chunk in the request's input stream. That roughly is what is meant by 'multipart/form-data'.
The servlet api has no direct support for reading in multipart form data. You can consider using apache's file upload package.
ram.
This is correct.
The file is streamed up to the server as part of multi-part message.
That message has to be parse before you can start working with the uploaded file.
See:
http://faq.javaranch.com/view?FileUpload