0
我是PrimeFaces的新手,我試圖學習,但是我遇到了有關安裝PrimeFaces的問題,組件不渲染。PrimeFaces 6.0不會渲染
到目前爲止我已經嘗試過。
PrimeFaces components are not rendered in browser in spite of dependency being present
Simple primefaces application not working
這裏是不工作的代碼。
輸出:
web.xml中(內部的WebContent的/ WEB-INF)
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<display-name>jsfmav</display-name>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<context-param>
<description>State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>resources.application</param-value>
</context-param>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
</web-app>
的pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sapo</groupId>
<artifactId>jsfmav</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>JSFMav</name>
<dependencies>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>6.0</version>
</dependency>
</dependencies>
<build>
<plugins>
</plugins>
</build>
</project>
的Tomcat 7.0,JSF 2.2,PrimeFaces 6.0
在xhtml中有名稱空間,h:頭,h:身體等嗎?嘗試添加PF庫到pom –
是的,我有。此外,我添加了pf存儲庫,但沒有更新我的問題。 –