You can send an image to a browser without writing a file using a servlet. The response type of the servlet would be the image mime type (e.g. image/png for png files) and instead of writing the image data to a file output stream you would send it to the servlet's output stream.
in the servlet it might look something like this...
If you call this servlet as the URL for your image then the browser should display it
SCJP 1.4, www.gsi3d.org.uk
subject: JPG�s from db and then deleting the files