Html Iframe正在提供空白页

Html Iframe正在提供空白页,html,jsp,iframe,Html,Jsp,Iframe,我正在jsp页面中使用iframe <iframe frameborder="1" src="view/jsp/refreshChat.jsp" STYLE='width:20%;' /> 但当我运行该页面时,它会给出一个空白页面。这是iframe代码的一个示例: <iframe src="page_to_show_inside_iframe.jsp" style="width:100%; height:250px;"> <p>Text to sho

我正在jsp页面中使用iframe

<iframe frameborder="1" src="view/jsp/refreshChat.jsp" STYLE='width:20%;' />


但当我运行该页面时,它会给出一个空白页面。

这是iframe代码的一个示例:

<iframe src="page_to_show_inside_iframe.jsp" style="width:100%; height:250px;">
  <p>Text to show in browsers that don't support iframes.</p>
</iframe>

在不支持iFrame的浏览器中显示的文本

也许你缺少身高的价值


此外,请确保正确引用了src属性的值,即相对路径已构建好(如果您的父页面URL为
http://localhost:8080/mysite/
myparentpage.jsp
尝试加载子页面,粘贴src值,而不是父页面的名称,
http://localhost:8080/mysite/
查看/jsp/refreshChat.jsp
,在新窗口或选项卡中测试)这是iframe代码的一个示例:

<iframe src="page_to_show_inside_iframe.jsp" style="width:100%; height:250px;">
  <p>Text to show in browsers that don't support iframes.</p>
</iframe>

在不支持iFrame的浏览器中显示的文本

也许你缺少身高的价值


此外,请确保正确引用了src属性的值,即相对路径已构建好(如果您的父页面URL为
http://localhost:8080/mysite/
myparentpage.jsp
尝试加载子页面,粘贴src值,而不是父页面的名称,
http://localhost:8080/mysite/
查看/jsp/refreshChat.jsp
,在新窗口或选项卡中测试)

检查src=“view/jsp/refreshcat.jsp”是否正确。您从哪个位置使用它?

检查src=“view/jsp/refreshcat.jsp”是正确的。从哪个位置使用此选项?

不要忘记将http://添加到您的web url。另外,避免使用本地主机。使用IP地址。

不要忘记将http://添加到您的web url。另外,避免使用本地主机。使用IP地址。

添加一些有帮助的更多信息。添加一些有帮助的更多信息。是的。我检查了3ice这个loc如果父页面和子页面的文件夹位置相同(深度相同),我尝试使用高度值2,但仍然存在相同的问题然后删除src上的
view/jsp/
部分。我的父页面和子页面的文件夹位置相同,我尝试过使用高度值2,但同样的问题仍然存在。如果父页面和子页面的文件夹位置相同(深度相同),则删除src上的
view/jsp/
部分。