NetBeans 6.9.1 演示 (ScrumToys) - JSF 2.0 未在 Internet-explorer 中呈现

发布于 2024-09-27 15:46:04 字数 375 浏览 0 评论 0原文

在 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 技术交流群。

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

发布评论

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

评论(2

ぇ气 2024-10-04 15:46:04

我不使用 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 be text/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:

木緿 2024-10-04 15:46:04

一个可能的“快速修复”是将以下内容添加到您的 web.xml 中:

<context-param>
        <description>The default for this parameter is false. Fixes IE xhtml content-type restriction.</description>
        <param-name>com.sun.faces.preferXHTML</param-name>
        <param-value>false</param-value>
</context-param>

A possible 'quick fix' is to add the following to your web.xml:

<context-param>
        <description>The default for this parameter is false. Fixes IE xhtml content-type restriction.</description>
        <param-name>com.sun.faces.preferXHTML</param-name>
        <param-value>false</param-value>
</context-param>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文