最后几个html标签没有渲染?

发布于 2024-07-15 10:57:06 字数 524 浏览 6 评论 0原文

我用谷歌搜索了一个有趣的问题,但也找不到任何参考资料,也许是因为我自己对原因太模糊了。

我有一个简单的 jsp 页面,它是从 struts 2 操作运行的。 它的 javascript 相当重,但它是我公司 Intranet 上的内部应用程序,所以这不是一个大问题。

到目前为止一切看起来都很正常,对吧? 但有趣的是,该页面上的最后几个标签无法呈现。 对于我尝试过的所有浏览器(IE、FF、Chrome)都是如此。

我所说的不渲染是指当您查看源代码时它们根本不存在! 更糟糕的是,在 IE 中,半个标签声明实际上作为文本打印在页面底部。 一切都很奇怪。

但更奇怪的是,如果我在 标签后面放几个
标签,那么所有浏览器都会向下渲染超过 < code> 标签,但仍然切断了最后几个
的。

有人听说过这样的事情吗? 我什至不知道从哪里开始排除故障! 我知道我的描述很模糊,但这只是因为我自己也有点模糊。

An interesting issue which I've googled and can find absolutely no reference too, perhaps because I'm too vague on the cause myself.

I have a simple jsp page that is run from a struts 2 action. It' fairly javascript heavy, but its an internal app on my company's intranet so thats not a great problem.

All seems normal so far, right? but interestingly, the last few tags on this page fail to render. This is true for all browsers I've tried it in (IE, FF, Chrome).

What I mean by not rendering is that they simply don't exist when you view the source! whats worse, in IE, half a tag declaration is actually printed as text at the bottom of the page. All very odd.

But what makes it even stranger, if I put a few <br /> tags after the </html> tag, then all browsers render down past the </html> tag, but still cut off the last few <br />'s.

Has anyone ever heard of anything like this? I don't even know where to start troubleshooting! I know my description is vague but that's only because I'm a bit vague on it myself.

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

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

发布评论

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

评论(7

空城之時有危險 2024-07-22 10:57:06

如果“查看源代码”没有向您显示标签,那么这不是渲染问题,而是服务器或网络问题,因为内容没有传递到浏览器。

If 'View Source' does not show you the tags then it is not a rendering problem, but a server or network problem, as the content is not being delivered to the browser.

梦幻的心爱 2024-07-22 10:57:06

对我来说这听起来像是缓冲区刷新问题。 您是否有任何过滤器可以在 html 到达浏览器之前对其进行缓冲?

It sounds like a buffer flush problem to me. Have you got any filters that might be buffering the html before it gets to the browser?

零度° 2024-07-22 10:57:06

听起来你在某处有一个未闭合的引号。 或类似的东西。 类似的东西甚至会弄乱源视图,因为某些浏览器不会在源视图中显示它们在套接字中接收到的确切字节流(我知道 IE 曾经这样做过)。 尝试使用 wget 或 telnet 客户端或类似的东西执行 GET,看看会发生什么。

Sounds like you have an unclosed quotation mark somewhere. Or something like that. Stuff like that can mess up even the source view as some browsers don't show the exact bytestream they received in the socket in source view (I know for a fact that IE used to do this). Try doing a GET with wget or a telnet client or something similar and see what happens.

私野 2024-07-22 10:57:06

我们应该看到你的jsp代码来回答。 我怀疑 jsp 中存在未闭合的标记或属性的未闭合的引号 - 正如 DrJokepu 所说。

We should see the code of your jsp to answer. I suspect there is an unclosed tag or a an unclosed quotation mark of an attribute - as DrJokepu said - in the jsp.

九厘米的零° 2024-07-22 10:57:06

这是我第一次听说 IE 的行为方式与其他浏览器相同; 偶然...

但是说真的,html 没有错误吗?

我建议使用 Firefox 的 html 验证器 扩展来显示 html 是否产生任何错误或警告。

某处肯定有错误,但如果没有代码,就不可能说出错误是什么。

That is the first time I have heard that IE is behaving the same way as the other browsers; by accident...

But seriously, is the html error-free?

I recommend using the html validator extension for Firefox to show you if the html is producing any errors or warnings.

There has to be an error somewhere, but without the code it is impossible to say what it is.

难理解 2024-07-22 10:57:06

一段时间前,我遇到了一个网站被“切断”的问题,类似地,我通过快速破解解决了该问题,但从未找到合适的解决方案。 对我来说,网络服务器似乎需要页面的内容长度才能正确呈现。 当我缓冲输出并添加内容长度时,页面将完全加载。 但技术不同 - 这是一个基于 Perl CGI 构建的应用程序,在 Apache 2.2 上运行。

I had a problem some time back with a web-site that was getting 'cut-off' and similarly, I solved the problem with a quick hack but never a proper solution. What it came down to for me was that the web server seemed to require the content-length of the page for it to render properly. When I buffered the output and added the content length, the page would load in full. Different technology though - this was an application built on Perl CGI running on Apache 2.2.

埋情葬爱 2024-07-22 10:57:06

感谢大家的帮助,但不幸的是这些似乎都没有帮助。 我找到了一种解决它的方法,因为它不是一个关键的应用程序,所以它只需要这样做。

再次感谢

Thanks for the assistance all, but unfortunately none of these seemed to help. I've found a hacky way around it and since its not a critical app, It'll just have to do.

thanks again

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