in order to display the image loaded, you have to store them in a scope larger than request
because
when request is ended and html page is builded and sended to browser, browser sends another requests to server for each img tag in html page.
so you have to :
1) store image in an scope broader than request like session
2) write some tags that reads data from them and writes them to jsp page
there is another solution
when you are making html page just put a refrence of the picture in page in IMG tag and lazy load pictures at time it is needed to be rendered, for example put entity name, and primary key of picture in picture name, and write a servlet that using these two fetches pictures from database and displays it.
some modern frameworks like seam have special soloutions for rendering pictures.