• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to display image using servlets..?

 
manju latha
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can any body please give me the code for
putting an image into database and retriving
it through jdbc using servlets and display that
image on to the browser.
iam using an html to send imagename and
using servlet to save it to database
and again want to retrive it through servlet
and display it on the browser.
thanx..
 
jawwad ahmed
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it is a bad idea to put images in the database.Keep link or name of that image in database.
 
Praveen Kumar Jha
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can push the image thr' servlet using a frame (and then image Ref. Jason Hunter Book) - or else
save the image to file system after retrieving from database and then href it.
 
Sandeep Jain
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Generally , the images are not put in the database as it increases the load on the database by around 400% and what is generally followed is u put all the images in a particular directory on ur webserver. u just store the filename in the database . so u take the filename from the database and attach the coresponding path where the file is located and display the image .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic