This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Java Micro Edition and the fly likes Uploading image to Servlet using Http Connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Uploading image to Servlet using Http Connection" Watch "Uploading image to Servlet using Http Connection" New topic
Author

Uploading image to Servlet using Http Connection

Alex Parvan
Ranch Hand

Joined: Dec 10, 2009
Posts: 115
Hi,

What are my options to do that ? I want to send an image from a mobile device (J2ME).

Can i just use request.getInputStream(); to read the bytes ? Or multipart/form-data ?

Thanks,
Alex


"Quoting yourself is stupid" - Me
Mark E Hansen
Ranch Hand

Joined: Apr 01, 2009
Posts: 643
If you want to do this with a client web application (in a browser), then you should look into the File Upload package from Jakarta Commons: http://commons.apache.org/fileupload/
Nazmul Quader
Greenhorn

Joined: Mar 12, 2010
Posts: 1
I think Parvan is talking about J2ME. Not mobile web. Any help ?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Uploading image to Servlet using Http Connection