【问题标题】:How to show httpget response on web page?如何在网页上显示 httpget 响应?
【发布时间】:2012-05-11 04:03:09
【问题描述】:

我需要显示从服务器到网页的 http 获取响应。我正在使用 jsp 页面和 Apache Tomcat 7.0。

【问题讨论】:

  • 你可以试试<jsp:include/> 或者JSTL <import/>

标签: http jsp get


【解决方案1】:

如果您需要在自己的 HTML 中内联结果,请使用 JSTL <c:import>

<c:import url="http://example.com/some-fragment.html" />

但是,如果结果实际上是整个 HTML 页面,当您将其包含在自己的 HTML 中时会导致 HTML 格式错误,则使用 HTML &lt;iframe&gt;

<iframe src="http://stackoverflow.com"></iframe>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-07-14
    • 1970-01-01
    • 2015-12-14
    • 2020-08-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多