2011-02-16 109 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参数的开始