我只用一個頁面index.xhtml(eclipse juno 4.2 + JBoss AS 7.1)製作了基本的動態web項目。當我運行我的網頁時,瀏覽器只顯示html元素而不是jsf。我的index.xhtml代碼:不顯示jsf元素
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
</head>
<body>
push the button:
<button>ok</button>
<h:button value="not ok"></h:button>
</body>
</html>
我只能看到「ok」按鈕。 當我開始我的服務器(獨立的)我已經警告說:
WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'com.sun.faces.vendor.Tomcat6InjectionProvider:org.apache.catalina.util.DefaultAnnotationProcessor' for service type 'com.sun.faces.spi.injectionprovider'
WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'com.sun.faces.vendor.Jetty6InjectionProvider:org.mortbay.jetty.plus.annotation.InjectionCollection' for service type 'com.sun.faces.spi.injectionprovider'
WARNING [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-3) JSF1069: Disabling the JSF 2.0 Facelets ViewHandler as an older FaceletViewHandler, com.sun.facelets.FaceletViewHandler, has been explicitly configured. If this is not desired behavior, remove the older FaceletViewHandler and library from your application.
假如任何人同樣的問題?我犯了錯誤,或者IDE或服務器有一些錯誤? 感謝您的幫助。
我有另一個問題。我想添加庫主面。我右鍵單擊項目然後屬性 - >部署程序集 - >添加和.jar顯示在管理窗口中,但庫不出現在文件層次結構(WEB-INF/lib)中。