This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Sending image from servlet using standard java io Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Sending image from servlet using standard java io" Watch "Sending image from servlet using standard java io" New topic
Author

Sending image from servlet using standard java io

Inderpal Singh
Greenhorn

Joined: Dec 05, 2005
Posts: 2
Hi All,

I want to send an image (gif file) from servlet to client browser using standard java io. I have a file object with me, which is nothing but a complete path of image. I am setting the contentType to image/gif and have tried so many things but didn't get through. So thought of writing in the forum.

I would appreciate if someone provide me answer for the above question as it is little bit urgent. Thanks in advance!

Cheers,
Inderpal Singh
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12676
    
    5
Check out this example of sending image data kindly provided by Ben Souther.
Bill


Java Resources at www.wbrogden.com
Inderpal Singh
Greenhorn

Joined: Dec 05, 2005
Posts: 2
Thanks Bill. I will try and post if I face any problems.....

Regards,
Inderpal Singh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sending image from servlet using standard java io
 
Similar Threads
How to send gif image using java mail service
request.getHeader()
refreshing the BLOB
using servlet to create a html page with embedded Image
Processing icon with simple jsp approach