• Post Reply Bookmark Topic Watch Topic
  • New Topic

Sending a photo through a Servlet.

 
badar tagar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using servlet to send a photo to the user from a relative address on the web server. Can anybody tell me how I can implement it.
Thanks in advance.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at any Servlet that returns a file, you'll be doing the same thing.
You just need to set the mime type for the returned image.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Setting the content-length is also a good idea.

Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!