NetBeans 6.9.1 演示 (ScrumToys) - JSF 2.0 未在 Internet-explorer 中呈现
在 ScrumToys Web 应用程序(NetBeans JSF 2.0 演示)中,.jsf 页面未在 internet-explorer 中呈现(我将页面源视为 XML)。
这在“适当”的浏览器(例如 Chrome 和 FireFox)中运行良好。
我正在使用 NetBeans 6.9.1 提供的 ScrumToys 演示应用程序(在GlassFish 3) 完全没有变化。我正在使用 Internet-explorer 8,访问此网址:http://localhost:8080/scrumtoys/home.jsf
In ScrumToys web-application (NetBeans JSF 2.0 demo) the .jsf page is not renderend in internet-explorer (I see the page source as XML).
This works fine in 'proper' browsers, like Chrome and FireFox.
I'm using the ScrumToys demo app provided by NetBeans 6.9.1 (running on GlassFish 3) with absolutely no changes. I'm using Internet-explorer 8, accessing this url:http://localhost:8080/scrumtoys/home.jsf
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不使用 Netbeans,也不打算下载它来检查其中一个或另一个,但众所周知,IE 在
Content-Type: application/xhtml+xml
方面存在问题。输出将显示为纯 XML,而不是呈现为 HTML。您所描述的症状符合此问题。为了解决这个问题,页面的
Content-Type
必须是text/html
并且 doctype 最好是< /代码>。如果这确实是解决方案,那么老实说让我惊讶的是演示应用程序就是这样发布的。
另请参阅:
I don't use Netbeans and I am not going to download it to check the one and other, but it's well known that IE has a problem with
Content-Type: application/xhtml+xml
. The output will be displayed as plain XML instead of rendered as HTML.The symptoms which you describe match this issue. In order to fix it, the
Content-Type
of the page has to betext/html
and the doctype has preferably to be<!DOCTYPE html>
. If that was indeed the solution, then it honestly said astonishes me that the demo application was shipped like that.See also:
一个可能的“快速修复”是将以下内容添加到您的 web.xml 中:
A possible 'quick fix' is to add the following to your web.xml: