each image would be a separate request, hence you'd take the image ID from the request and put it in the SQL query. I'd recommend using a PreparedStatement when using input from the request in SQL to guard against SQL Injection.
Common mistake: what you want is an HTML page that creates an HTML 'img' tag for each image, then each image results in a separate request to the image servlet and passes the specific ID, then the image servlet responds to each image image request with the image.
The other way would be to send a sing;le request and join the images together, but that is an image manipulation question, not a servlet question
Why it would be that there would be only 1 Image per one request .
I cant take a better example than this
For example consider a Porno site , which would display Thumb Nails of Images on to the page , when the site clicked on .
So , i want it in that way actually .
Joined: Mar 22, 2005
It seems you do not have a deep understanding of how the web works. Start by examining the HTML source of a web page that contains multiple images. Then use an HTTP monitor (like the Firefox extension LiveHttpHeaders) to observe how that page is loaded, and in particular, how the HTML is accessed first, and then multiple requests for each of the images is sent. Also be sure to investigate the connection between the IMG tags Dave mentioned and the URLs being accessed on the server. Once you have a handle on all that you're in a position to make progress with the implementation; before that time you will struggle.