IFRAME 使 src servlet 在 ipad safari 上执行两次

发布于 2025-01-02 14:06:56 字数 571 浏览 0 评论 0原文

我有一个 iframe,它从 servlet 获取其内容。问题在于,加载 iframe 页面时,servlet doGet 方法执行了两次。这是 html:

<div style="position: absolute;top: 135px;left:0px;overflow-y:scroll;overflow-x:scroll;width: 975px;height: 873px;" align="center">
    <iframe src="documentviewer?docid=#{viewIncomingBean.connectedAttachment.id}" width="630px" height="873px" style="border: 1px solid black;"></iframe>
</div>

只有当我在 ipad safari 上运行应用程序时才会出现此问题,在 firefox 上运行良好

有什么方法可以防止 servlet 的双重执行?

I have an iframe which gets its content from a servlet. The problem is that the servlet doGet method gets executed twice when the page of the iframe is loaded. Here is the html:

<div style="position: absolute;top: 135px;left:0px;overflow-y:scroll;overflow-x:scroll;width: 975px;height: 873px;" align="center">
    <iframe src="documentviewer?docid=#{viewIncomingBean.connectedAttachment.id}" width="630px" height="873px" style="border: 1px solid black;"></iframe>
</div>

this problem only show up when i run the application on ipad safari, it works fine on firefox

Is there any way to prevent the double execution of the servlet?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凉风有信 2025-01-09 14:06:56

是否存在合法两次调用 doGet 方法的问题?这里有2个页面请求,1个针对页面,1个针对IFRAME。

如果我误解了问题所在,请告诉我。

Is there a problem that it is hitting your doGet method twice legitimately? There are 2 page requests here, 1 for the page and 1 for the IFRAME.

If I am misunderstanding what is wrong, let me know.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文