无法从外部链接获取img src

Unable to get the img src from the external link

本文关键字:img src 获取 链接 从外部      更新时间:2023-09-26

我有一个Html页面,我有一个图像标签,我想显示我在外部webApplication中部署的图像。当我在浏览器中浏览该链接时它可以工作但当我将该链接添加到img src中时它不能工作

<img id="empPic" alt="" src="http://xyz/emp/displayImage.jsp?empId=7" width="90px" height="100px" style="border-radius: 12px;">
src="http://xyz/emp/displayImage.jsp?empId=7"

服务器脚本必须给你图像的数据,而不是对图像的引用。

如果jsp只给您一个引用,您必须首先接收引用并在src属性

中设置它。