我在eclipse中使用jsf創建了一個動態Web應用程序。我用'新的java服務器端(jsf)頁(xhtml)'模板創建了一個jsp頁面,並且只想顯示一個h:inputText,但是當我在tomcat中運行我的應用程序時,inputText不顯示出來。在xhtml頁面顯示jsf組件
當我使用'新的java服務器面(jsf)頁(html)'模板我不會有任何問題,但我必須在我的項目中使用xhtml。
我使用日食靛藍SR2 3.7.2 - MyFaces的2.0.14 - tomcat的7.0.29
我的罐子:公地的BeanUtils-1.8.3 - 公地編解碼器1.3 - 公地的集合 - 3.2 - commons-digester-1.8 - commons-logging-1.1.1 - jstl-api-1.2 - jstl-impl-1.2 - myfaces-api-2.0.14 - myfaces-bundle-2.0.14 - myfaces-impl-2.0.14
main.jsp中:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!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:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Insert title here</title>
</h:head>
<h:body>
<f:view>
<h1>JSF XHTML</h1>
<h:inputText value="Hi"></h:inputText>
</f:view>
</h:body>
</html>
什麼問題?