Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Mohammad Abu Hmead
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Stan Sokolov
Ranch Hand
Posts: 120
Hibernate IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic