try to open a connection and use the same through out your servlet life.even does not need to close stmt.
and next is you can't keep the images in side your database
just you put your image name and path inside the database and retrieve it while displaying.
Best of luck
Regards Rezaul 9559441815