I have a database with images and I need to access the images in my project and display them in jsp page.
Newbee here i have no idea about getting image and displaying it in jsp page.
Everyone suggested going with creating a servlet and getting the image file.
Can anyone help me with this???
You don't "display in a jsp page" - you use JSP to write an HTML page that has an <IMG tag that provides the information needed for a servlet to retrieve and send the binary image data.
<br /> GETing the image data is a separate request/response cycle just like GETing every other resource that makes up an HTML page.
<br /> Bill
<br /> >
Thank you for your response.William Brogden & syed ali.
But i dont know how to write a servlet for fetching the image and displaying in the screen.
In my jsp page the number of images depend on certain conditions so the number of images fetched is unknown each time.
I have js for retriving the url location and number of images i need to fetch from the db.
How do i wade further....with the location of image.
Im sorry bear but i have to correct you there are tutorials through which we can learn and gain knowledge if anyone can help with solutions for a particular problem is the reason they post question in forum.
I serched understood and tried implementing. ("And i never asked for ready made code all i asked is guiding a horse to water drinking it is left to me." - You can ignore this if it hurts your ego )
FYI = For your information
i haven't done "CrossPosting" i just learned Java Servlets better through free tutorials.
From my question itself you should have understood that i had little knowledge about servlets ,
You tried to help me I appreciate it.Thanks for it