This week's book giveaway is in the General Computing forum.
We're giving away four copies of Raising Young Coders: A Parent’s Guide to Teaching Programming at Home and have Cassandra Chin on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

how to display image using servlets..?

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
 
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 .
 
reply
    Bookmark Topic Watch Topic
  • New Topic