Question

I'm developing an application using JSF with PrimeFaces. I've a problem in the Facelets page where < p:xxx > tags are not displayed in the page. Every < p: xxx > tags are diplayed like a simple inputText.

This is the start of my xhtml page

       <!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://java.sun.com/jsf/core"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:p="http://primefaces.org/ui"> 

and this part of the web.xml page

<servlet-mapping>
  <servlet-name>Faces Servlet</servlet-name>
  <url-pattern>/faces/*</url-pattern>
  <url-pattern>*.jsf</url-pattern>
  <url-pattern>*.xhtml</url-pattern>
</servlet-mapping>

I've got also the primefaces-4.0.jar in the folder WEBContent/WEB-INF/lib/primefaces-4.0.jar

Was it helpful?

Solution

You're missing the <h:head/> tag in your page. This tag defines the region in which the JSF runtime can inject the necessary javascripts for rendering elements and processing ajax in your page.

Related:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top