This content has been marked as final. Show 2 replies
It's very simple.
When the request comes to the servlet use HttpServletRequest's getInputStream() method to gain access to the incoming data. Then, copy the data from IntpuStream to some OutputStream (in your case it'll be probably FileOutputStream - see the javadoc) and finally close the streams. You can also send a response to midlet.
This is written very general, if You face a particular problem ask conrete question.
The upload request must comply to RFC1867 (see [url http://www.ietf.org/rfc/rfc1867.txt] ). The servlet must parse this request with Apache Commons FileUpload. You can find an example of a servlet with Commons FileUpload here: [url http://www.javaatwork.com/java-upload-applet/samplecode.html#servlet].
Edited by: 883020 on Sep 7, 2011 7:03 AM