Faceletsを使用して静的HTMLプロトタイプを作成したいと思います。このプロトタイプは、TomcatなどのWebアプリケーションサーバーを実行していない人に送信されます。ビルド時に(Antなどを使用して)FaceletsサイトをフラットなHTMLファイルのセットにコンパイルする方法はありますか?
最も単純なケースでは、次のような2つのファセットがあります。
<!-- layoutFacelet.xhtml -->
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets">
<ui:insert name="content" />
</ui:composition>
<!-- implementationFacelet.xhtml -->
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
template="layoutFacelet.xhtml">
<ui:define name="content">
HELLO WORLD
</ui:define>
</ui:composition>
出力は、次のような単一のhtml(たとえば、「implementationFacelet.output.html」)になります。
HELLO WORLD
つまり、静的フラットファイルプロトタイプを作成するために、Faceletsはレンダリング時ではなくビルド時に実行されます。