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
posted
0
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
posted
0
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
posted
0
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
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.