在JSF中删除了HTML doctype

时间:2013-01-09 03:37:52

标签: java jsf jsf-2 facelets

我的<!DOCTYPE html>声明已从我的JSF页面中删除,而且它正在搞乱。

同样的问题已被问过很多次:

HTML doctype declaration in JSF

DocType is not showing in the rendered output from JSF

JSF template: rendered page missing DOCTYPE

麻烦的是,this Jira entry说错误已经修复。显然不是。我正在使用最新版本:

    <dependency>
        <groupId>com.sun.faces</groupId>
        <artifactId>jsf-impl</artifactId>
        <version>2.2.0-m07</version>
    </dependency>

    <dependency>
        <groupId>com.sun.faces</groupId>
        <artifactId>jsf-api</artifactId>
        <version>2.2.0-m07</version>
    </dependency>

供参考,以下是我的页面:

test_layout.xhtml:

<!DOCTYPE html>
<html xmlns:ui="http://java.sun.com/jsf/facelets">
<body>
    <ui:insert name="content"/>
</body>
</html>

test_content.xhtml:

<ui:composition 
    xmlns:ui="http://java.sun.com/jsf/facelets"
    template="test_layout.xhtml">

    <ui:define name="content">
        bunch 'o content
    </ui:define>

</ui:composition>

有人找到了解决方法吗?

1 个答案:

答案 0 :(得分:0)

我升级到2.2.0-m08,问题就消失了。

相关问题