Hello Brain
Thanx a lot once again for the guidence you gave.
With your tips and help I was able to write a piece of code, but I am unable to display the JPG image in my JSP page. I read the image and send the binary data to the ServletOutputStream.
I am including the piece of code. Please let me know where I am commiting the mistake.
Class.forName("oracle.jdbc.driver.OracleDriver");
String str_url = "jdbc

racle:thin:@gops_test:1521:GOPS";
Connection con = DriverManager.getConnection(str_url,"gops","gops");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM TeeColor where TCOLOR='Black4j'");
if (rs.next())
{
String dim_image = rs.getString("TCOLOR");
//byte [] blocco = rs.getBytes("TCBLOB");
response.setContentType("image/jpeg");
ServletOutputStream op = response.getOutputStream();
///////////////
Blob blob;
blob = rs.getBlob( "TCBLOB" );
System.out.println("TCBLOB");
int iLength = (int)(blob.length());
op.write(blob.getBytes( 1, iLength ));
/////////////////
}
rs.close();
stmt.close();
con.close();
} catch(Exception e) {
out.println("An error occurs : " + e.toString());
}
in the above example I am for sure that it reads the image, it shows me the size of the file, but on the page I can see the image icon, with no image display.
Wish I will be able to solve the problem.
Thanx once again.
Bye
Jain