0

I am using primefaces4.0 with glassfish4 and java ee7 on Eclipse kepler.
I configure it (put the jar of the theme and primefaces on the lib and the java builpath and the class variables and add it on the <htm> and the web.xml) but the components doesn't appear at all. This is my code

    <!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"
 xmlns:p="http://primefaces.org/ui">
    <h:head>
     <meta charset="windows-1256"></meta>
      <title>Connexion</title>
     </h:head>
     <h:body>
      <h:form>
      <fieldset> 
      <p:outputLabel for="email">Adresse email <span class="requis"></span>     </p:outputLabel>    
            <p:inputText id="email" value="" required="true" size="20" maxlength="60"  />
      <p:message id="emailMessage" for="email" errorClass="erreur" />
      <br/>  
       <p:outputLabel for="motdepasse">Mot de passe <span class="requis"></span></p:outputLabel>
      <p:inputSecret id="motdepasse" value="" required="true" size="20" maxlength="20"                       />
        <p:message id="motDePasseMessage" for="motdepasse"
            errorClass="erreur" />
        <br />
        <p:commandButton value="Connexion" action="" ajax="false" />
        </fieldset>
        </h:form>

                    </h:body>
                    </html>

and this is my web.xml file

        <?xml version="1.0" encoding="UTF-8"?>
        <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xmlns="http://xmlns.jcp.org/xml/ns/javaee" 
        xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee       http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" 
id="WebApp_ID" version="3.1"
        >
        <display-name>Portail</display-name>
        <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        </welcome-file-list>
         <context-param>
         <param-name>primefaces.THEME</param-name>
         <param-value>bootstrap</param-value>
          </context-param>
   <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>*.xhtml</url-pattern>
         </servlet-mapping>

        </web-app>
Cœur
  • 37,241
  • 25
  • 195
  • 267
MeknessiHamida
  • 185
  • 1
  • 8
  • 28

2 Answers2

2

Your filename is index.html but in your web.xml you specified that you just wanted to render files that end with .xhtml. Rename your file to index.xhtml

Lukas Eichler
  • 5,689
  • 1
  • 24
  • 43
0

I figured out why the components wasn't rendring after reading this post No TagLibrary associated to PrimeFaces's namespace.

I did put the jar in the lib but i didn't deploy them correctly that's why the tags weren't doing their work . I repeated the configuration this time with more attention and it finally worked.

Community
  • 1
  • 1
MeknessiHamida
  • 185
  • 1
  • 8
  • 28