当前位置: 动力学知识库 > 问答 > 编程问答 >

Cannot displaying Blob image in JSP in HTTPS

问题描述:

I am trying to retrieve a blob from database and display it in jsp

Here is the code :

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);

}

The code work fine in our uat environment which is using http, but fail in production environment which is HTTPS

In production, when the image going to display, a Security Warning will prompt will message

"Do you want to view only the webpage content that was delivered securely ?

This webpage contains content that will not be delivered using a secure HTTPS connection, which could compromise the security of the entire webpage."

  1. If I choose Yes , the image will not be shown.
  2. If I choose No, only a bad image logo ( a red cross) will be shown

    Anyone have idea ? Please kindly help

    Thanks

分享给朋友:
您可能感兴趣的文章:
随机阅读: