*
The moose likes Servlets and the fly likes How to send image from Servlet to J2ME app and display it on the app? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to send image from Servlet to J2ME app and display it on the app?" Watch "How to send image from Servlet to J2ME app and display it on the app?" New topic
Author

How to send image from Servlet to J2ME app and display it on the app?

Mohammad Abu Hmead
Greenhorn

Joined: Jul 18, 2011
Posts: 2
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?
Stas Sokolov
Ranch Hand

Joined: Apr 13, 2004
Posts: 117

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.



Good luck for yourself.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to send image from Servlet to J2ME app and display it on the app?
 
Similar Threads
File Connection path for siemens mobile
image in netbeans
Why did it have to be PNG
architectural help required
Displaying Image in java swings