my dog learned polymorphism*
The moose likes Servlets and the fly likes storing/retrieving image to/from database problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "storing/retrieving image to/from database problems" Watch "storing/retrieving image to/from database problems" New topic
Author

storing/retrieving image to/from database problems

fadzizo abdullah
Greenhorn

Joined: Apr 28, 2007
Posts: 23
Hi guys…

I’ve developed a midlet to store captured image from the phone’s camera into a database located on a server. At the server side, servlet is used to accept the captured image from the midlet and store in into the database.

The problem is, when I tried to retrieve the captured image and view it back on my midlet, half of the image became black except only small portion of the upper part of the image was ok.

Here are the code segments:


Midlet codes:


Servlet codes:


I hope you guys can help and guide me….thanks in advance
ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403
Hi,

You need to set below lines in your code and then try..




Cheers!!!
Ujjwal B Soni <baroda, gujarat, india> <+919909981973>
"Helping hands are better than praying lips......"
fadzizo abdullah
Greenhorn

Joined: Apr 28, 2007
Posts: 23
hi ujjwal

1. why i need to change CLDC 1.1 to CLDC 1.0....?? im using CLDC 1.1....
2. do i need to delete any setRequestProperty() in order to put the suggested ones...??

thanks in advance...
 
 
subject: storing/retrieving image to/from database problems