• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Display image in JSP

 
chetan dhumane
Ranch Hand
Posts: 641
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to display image stored in BLOB format .
I want to read it from MySQL and display on JSP page.

Thanks in advance
 
Ankit Garg
Sheriff
Posts: 9529
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic