image retrieve

Discussions

Web tier: servlets, JSP, Web frameworks: image retrieve

  1. image retrieve (6 messages)

    I successfully inserted the Blob gif image into oracle db. I also know how to retrieve by usin getBlob() but how can I convert the byte[] into gif and place into my jsp?<img src="xxx"> xxx is the gif file.

    Threaded Messages (6)

  2. image retrieve[ Go to top ]

    hi there ..
    u can use gifencoder for that
    or there is jpegencoder too.

    bye
    nayana

  3. image retrieve[ Go to top ]

    But I can't find in JDK1.2 and J2EE api?Can you tell me where it is?
  4. image retrieve[ Go to top ]

    hey MAT if u wanna those files..give me ur mail id.i will mail u those files.

    bye for now
    nayana
  5. Re: image retrieve[ Go to top ]

    hi Nayana, Please help me tooooo Same problem here :o(
  6. hi,

    can please send the code you written for storing a .gif file
    in a BLOB field of Oracle database.

    thanks
    ravindra
  7. PreparedStatement pstmt = conn.prepareStatement(
            "INSERT INTO PHOTO VALUES( ?, ? )" );

          pstmt.setString( 1, "photo1");
          File a = new File("1.gif");
          FileInputStream b = null;;
          try{
            b = new FileInputStream(a);
          }catch(java.io.FileNotFoundException fn){fn.printStackTrace();}
          pstmt.setBinaryStream( 2, b, (int)( a.length()) );
          pstmt.executeUpdate();