Heres a better plan.
How about you write some of your own code, and post back here if you have trouble?
Or google for sample codes?
It breaks down rather simply
1 - Determine file to write to (use ServletContext.getRealPath() method)
2 - retrieve BLOB from database into byte array using java.sql package.
3 - write byte array to file using java.io package.
PreparedStatement pst = null;
ResultSet rs=null;
pst = conn.prepareStatement("select image from imagedetails where imageid='"+imageid+"'");
rs=pst.executeQuery();
while(rs.next())
{
byte[] b=rs.getBytes("image");
FileOutputStream fos=new FileOutputStream("c://image.jpg");
fos.write(b);
}
hi this the code to retrieve the image from DB and write to a file.