我正在尝试从数据库中检索blob并在jsp中显示它 这是代码:
response.setContentType("image/bmp");
con = dbMon.connect(Con_id);
stmt = con.createStatement();
rs = stmt.executeQuery(sql);
while (rs != null && rs.next()) {
out.clear();
OutputStream os = response.getOutputStream();
os.write(rs.getBytes("IMAGE"));
out.flush();
dbMon.close(con);
}
代码在我们使用http的uat环境中正常工作,但在HTTPS生产环境中失败 在生产中,当图像显示时,安全警告会提示将发出消息 “您是否只想查看安全传送的网页内容? 此网页包含使用安全HTTPS连接无法提供的内容,这可能会影响整个网页的安全性。“