Uploading images from Midlet

Hi,

I need to upload a image from the Midlet using a middle layer program.

I am using servlets as middle layer.

I have send the image via outputStream from midlet. But in my servlet, there is no data present in the httpServletRequest object.

Anybody tell me how to pass the image data from Midlet?

[328 byte] By [vinay07a] at [2007-11-27 6:33:44]
# 1
check out this http://www.java-tips.org/java-me-tips/midp/how-to-download-an-image-from-a-web-server.htmland for for stuff http://www.java-tips.org/java-me-tips/midp/ and type 'image' in the filter field
suparenoa at 2007-7-12 17:59:42 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2
Thanks for ur reply.In that links, they specifyed about how to download the image from the server.I need to upload the image to a servlet?Is there any method having the functionality of httpServletRequest.setAttribute() method in J2ME?Thanks in advance.
vinay07a at 2007-7-12 17:59:42 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 3
you have to open a Connection to the servlet and send a byte[] representation of the imagesee Connection javadoc and tutorials... http://java.sun.com/javame/reference/apis/jsr118/ http://developers.sun.com/techtopics/mobility/allarticles/#networking
suparenoa at 2007-7-12 17:59:42 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 4

Thanks for ur reply.

I am sending the image through the OutputStream after converting it as a byte array only.

My servlet receives a few amount of data that is equal to the amount of data that passed in the first chunk ( I have found this by seeing the Network Monitor, I am using Sun Java WTK )

Any idea?

Thanks in advance.

vinay07a at 2007-7-12 17:59:42 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 5
> Any idea?any idea for what?
suparenoa at 2007-7-12 17:59:42 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 6
Thanks for ur reply.I am asking about, how to pass the complete data to servlets?FYI I am using Http Post method and OutputStream to send the data in my midlet.-Thanks
vinay07a at 2007-7-12 17:59:42 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 7
Are you still having trouble with this? Post the code that you are using to write to the outputstream in the midlet and the corresponding read code from the servlet.
rashidmayesa at 2007-7-12 17:59:42 > top of Java-index,Java Mobility Forums,Java ME Technologies...