blob1 = rs.getBlob("F_MSGPHO");
        if (blob1 != null) {
          byte[] ab = blob1.getBytes(1, (int) blob1.length());
          res.setContentType("image/jpeg");
          ServletOutputStream op = res.getOutputStream();
          op.write(ab);
          op.flush();
          op.close();
        }

解决方案 »

  1.   

    <img name="q" src="your are url" width="477" height="334" alt="">
      

  2.   

    blob1 = rs.getBlob("F_MSGPHO");
            if (blob1 != null) {
              byte[] ab = blob1.getBytes(1, (int) blob1.length());
              res.setContentType("image/jpeg");
              ServletOutputStream op = res.getOutputStream();
              op.write(ab);
              op.flush();
              op.close();
            }
    请问这段代码出现在servlet中吗
    res如何定义的
      

  3.   

    照你的方法做,总是提示
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid operation for the current cursor position.