JSF Facelets如何包含外部html?

Cat*_*ish 7 jsf facelets jsf-2

我有一个正在开发的应用程序,我的公司有一个标题横幅,需要在所有页面上.我们在该标题横幅的团队中有大约6个不同的版本,我现在想要制作它以便我只是将源代码中的横幅包含到我的应用中,这样如果他们更新横幅的来源,我的应用版本的横幅也会自动更新.

使用<ui:include src="http://mycompany.com/banner.html" />导致错误The markup in the document following the root element must be well-formed..

即使它没有很好的形成xml,我怎么能包含这个横幅?

我目前的模板:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.org/ui"
    xmlns:ui="http://java.sun.com/jsf/facelets">

<ui:composition>

<h:body>
    <div>
      <ui:include src="http://mycompany.com/banner.html" />
    </div>

    <ui:insert name="content" />
</h:body>
</ui:composition>
</html>
Run Code Online (Sandbox Code Playgroud)

Bal*_*usC 12

Facelets <ui:include>标记是用于在HTML文档中嵌入外部资源的错误工具.

请改用HTML <iframe>元素.

<iframe src="http://mycompany.com/banner.html"></iframe>
Run Code Online (Sandbox Code Playgroud)