1

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

Bella
  • 139
  • 1
  • 2
  • 10
  • Thanks @Makky I have already created pages with primefaces components in eclipse and are displayed correctly but now in this specific page are not diplayed. I don't think it is a problem of configuration of eclipse – Bella Jan 19 '14 at 22:13
  • The Primesfaces' tags are not underlined by yellow color by the IDE ? – Omar Jan 19 '14 at 22:41
  • no, there is no yellow or red underscore – Bella Jan 19 '14 at 23:11
  • Where is the rest of your page? Do you have `` defined on the page? – kolossus Jan 20 '14 at 01:01
  • 1
    thanks @kolossus ! this works fine. I 've forgotten the "h" in the head's tag. Can you put your answer as the predefined one so I can check it as the correct one?! – Bella Jan 20 '14 at 01:37

1 Answers1

2

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:

Community
  • 1
  • 1
kolossus
  • 20,559
  • 3
  • 52
  • 104