aspose file tools
The moose likes JSP and the fly likes Display image in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Display image in JSP" Watch "Display image in JSP" New topic
Author

Display image in JSP

chetan dhumane
Ranch Hand

Joined: Jan 07, 2009
Posts: 628

How to display image stored in BLOB format .
I want to read it from MySQL and display on JSP page.

Thanks in advance


http://www.androcid.com/
Ankit Garg
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9189
    
    2

Well you need to create a servlet which will be mapped to a URL like /serv/image and then in your JSP you have to write something like this



Here I'm taking the image ID to be 3434. The servlet will retrieve the image for that ID and send it as a response. You can search on google for the code for that servlet. this article also shows that type of servlet...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Display image in JSP
 
Similar Threads
Displaying an image in jsp
How Display image in a JSP that retrieved from a database?
Displaying images on JSP page
OutputStream an image within struts2 action class got error - Response already committed
thumbnail in jsp