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();
}
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();
}
解决方案 »
- 为什么css样式中的hover在JSP中不起作用
- Applet嵌入jsp运行很慢且占用CPU很高
- List products=dao.getProducts();不兼容的类型
- 10行代码说说成员变量,局部变量和静态方法
- session生命周期问题
- java.sql.SQLException: 无法从套接字读取更多的数据
- Flex 中 DataGrid 可编辑时,编辑完后怎么取得编辑后的新值,我要更新数据库
- 请问Servlet中如何得到get过来的参数?需要自己分析QueryString吗?
- 怎么按断是按下了哪个键?
- logback日志的路径到地址在哪里?
- 请教高手:如何用jsp语句把数据库某字段变成空
- 100分请教一个SQL的写法和解决办法。
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如何定义的
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid operation for the current cursor position.