[Logo]
Forums Register Login
How to send image from Servlet to J2ME app and display it on the app?
Dear Guys,

I created DB (EmployeeID, EmployeeName, EmployeePicLink), the last column contains the link of the image (D:\Employees Images\face5.png) as sample
I want to create servlet that gets the image and sends it to the mobile as response to mobile request
At mobile side i want to receive the images as stream and display them on list.

How I will do that?
 
Mohammad Abu Hmead wrote:Dear Guys,

I created DB (EmployeeID, EmployeeName, EmployeePicLink), the last column contains the link of the image (D:\Employees Images\face5.png) as sample
I want to create servlet that gets the image and sends it to the mobile as response to mobile request
At mobile side i want to receive the images as stream and display them on list.

How I will do that?


Little coding for servlet



You would also need to implement an interface. Within the interface you should open a file that contains an image and saves it to the output stream that is provided. It also possible to generate message using JPEGImageEncoder. But you should not need it because you already have an JPG image.

Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards



All times above are in ranch (not your local) time.
The current ranch time is
Dec 11, 2017 12:12:46.