2

私はICEfaces3アプリケーションに取り組んでおり、次のXHTMLファイルがあります。

<?xml version='1.0' encoding='UTF-8' ?>
<!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:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ice="http://www.icesoft.com/icefaces/component"
    xmlns:icecore="http://www.icefaces.org/icefaces/core"
    xmlns:ace="http://www.icefaces.org/icefaces/components"
    >
<h:head></h:head>
<h:body>
    <ui:composition template="template/main-template.xhtml"> ... </ui:composition>
</h:body>
</html>

WARに含まれているicefaces-compatなしでこのテンプレートを使用するとうまく機能します(明らかにACEコンポーネントのみを使用している限り)。しかし今、私はいくつかのice:コンポーネントを使用するのが好きなので、-compatJARが必要です。ただし、このJARをWARに追加すると、次のエラーが発生します。

12.04.2012 13:56:32 org.icefaces.impl.event.BridgeSetup isListenerForSource
WARNING: ICEfaces configured for view /configuration.xhtml but h:head and h:body components are required

このエラーは、ui:compositionタグを側面から完全に削除した場合、つまり<h:body>タグが空の場合にも発生します。

さらに詳しい情報を提供できてうれしいですが、今のところ、何が重要かわかりません。唯一の違いは、-compatライブラリをWARに追加することです。

4

1 に答える 1

2

私はついに非常に単純な解決策を思いつきました。WEB-INF/faces-config.xmlファイルを追加するのを忘れました。ACEなどを使えば問題ないようですが、-compatjarを使うとすぐに必要になるようです。ファイル自体に含める必要があるのは次のとおりです。

<?xml version="1.0" encoding="UTF-8"?>
<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
                              http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
          version="2.0">
</faces-config>
于 2012-04-13T14:23:48.223 に答える