This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes how to display image using servlets..? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to display image using servlets..?" Watch "how to display image using servlets..?" New topic
Author

how to display image using servlets..?

manju latha
Greenhorn

Joined: Jul 04, 2002
Posts: 28
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..


manju
jawwad ahmed
Ranch Hand

Joined: Dec 01, 2001
Posts: 179
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

Joined: Jul 27, 2002
Posts: 10
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.


Praveen Kumar<br />Sun Certified Programmer for Java 2 Platform
Sandeep Jain
Ranch Hand

Joined: Oct 25, 2000
Posts: 124
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 .


Try and Try Till u succeed<br /> <br />Sandeep Jain
 
 
subject: how to display image using servlets..?
 
Similar Threads
Retrieve Images from oracle
Presenting image read from database in a html page
Displaying thumb nail image
JDBC connectivity
Image Upload