2011-02-16 107 views
1

我對Richfaces非常陌生。未找到Richfaces異常資源

在使用<ui:include>我得到異常的

Not Found in ExternalContext as a 
Resource 
    com.sun.facelets.impl.DefaultFaceletFactory.resolveURL(DefaultFaceletFactory.java:116) 
    com.sun.facelets.impl.DefaultFacelet.getRelativePath(DefaultFacelet.java:216) 

請幫助。

在此先感謝

回答

0

在我的應用我有在戰爭文件的根兩個文件:

  • 的template.xhtml
  • navigation.xhtml

我參考navigation.xhtml的template.xhtml通過UI:包括

<html 
xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de" 
xmlns:ui="http://java.sun.com/jsf/facelets" 
    xmlns:f="http://java.sun.com/jsf/core"> 
    ... 
    <ui:insert name="navigation"> 
    <ui:include src="/navigation.xhtml"/> 
    </ui:insert> 
    ... 
</html> 

也許你忘記添加/SRC參數的開始