You can store image as BLOB in the DB , but it not recommended bcoz , it takes lot of of time and increaded database files inturn it will be difficult to maintain the database in terms of archiving,etc.
So better option is to store in file system and store that reference in database. Then user java io and servlet stream API together to render the response.
you can see example at the following url
http://www.exampledepot.com/egs/java.../GetImage.html
Suman.