2012-04-14 89 views
1

我在JBOSS 6,Eclipse,JSF MOJARRA中遇到了這個奇怪的問題。JSF,JBOSS錯誤顯示

所以這是我的index.xhtml:

<!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:h="http://java.sun.com/jsf/html" 
     xmlns:f="http://java.sun.com/jsf/core" 
    > 

    <!-- 
     Replace path to template, title, header and body 
     with actual data. 
    --> 
    <h:head> 
     <title>JSF 2.0 Hello World</title> 
    </h:head> 
    <h:body> 
     <h3>JSF 2.0 Hello World Example - hello.xhtml</h3> 
     <h:form> 
      <h:inputText value="#{helloBean.name}"></h:inputText> 
      <h:commandButton value="Welcome Me" action="welcome"></h:commandButton> 
     </h:form> 

    </h:body> 

</html> 

在執行我已經得到了網頁的只有標題,沒有輸入文本,沒有按鈕。 請幫幫我!

回答

3

它看起來你的頁面不能被解析。你應該檢查你的faces-config.xml,如果它有這行代碼

< view-handler>com.sun.facelets.FaceletViewHandler< /view-handler>
(擦除空格),你的lib必須有jsf-facelets.jar。

+0

非常感謝!它現在有效 – daly 2012-04-28 18:46:02