我只用一个页面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)中。