0
PrimeFaces에서 JSF를 사용하여 응용 프로그램을 개발했습니다. Facelets 페이지에서 <p:xxx>
태그가 페이지에 표시되지 않는 문제가 있습니다. Facelets 페이지에서 라벨, 텍스트 상자 및 버튼을 표시합니다. 이 발생하는 방법PrimeFaces 구성 요소가 렌더링되지 않습니다.
<!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://primefaces.org/ui"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:i="http://primefaces.prime.com.tr/touch"
xmlns:p="http://primefaces.org/ui">
<h:head></h:head>
<body>
<ui:composition template="/templates/template.xhtml">
<ui:define name="content">
<h:form>
<h:outputLabel for="curator" value="Name:" style="font-weight:bold"/>
<p:inputText id="curator" value="#{user.curator}" />
<p:commandButton value="Submit" update="display"/>
</h:form>
</ui:define>
</ui:composition>
</body>
</html>
내 web.xml 파일
<?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" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>Cation</display-name>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<welcome-file-list>
<welcome-file>faces/login.xhtml</welcome-file>
</welcome-file-list>
<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>
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
</web-app>
이며 어떻게 해결 할 수 있습니다 만 레이블이 페이지에 표시됩니다?
classpath에 Primeface jar (s)가 포함되어 있는지 확인하고'body :'body를'h : body'로 변경해보십시오. –
@LaabidiRaissi : 본문에서' ** 무시 **하고 따라서 문제와 무관합니다. 중요한 것은 OP가 전혀 보이지 않는 마스터 템플릿 파일'/ templates/template.xhtml'입니다. –
BalusC
네, 맞습니다. BalusC. @ user2476979 언급 된 BalusC로 템플릿을 보여주고, 또한 서버 로그를 확인하십시오. Primeface jar가 classpath에 포함되어 있다면, 일반적으로 사용 된 PF 버전에 대한 내용이 인쇄됩니다 –