繁体   English   中英

使用JSF,JBOSS显示不正确

[英]Incorrect display with JSF, JBOSS

我在JBOSS 6,Eclipse,JSF MOJARRA中遇到了这个奇怪的问题。

所以这是我的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>

在执行中我只有页面的标题,没有输入文本,没有按钮。 请帮我!

它看起来无法解析您的页面。 如果它有这行代码,你应该检查你的faces-config.xml

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM