Primeface components do not appear

Asked

Viewed 951 times

1

Guys good afternoon already tried everything change the url of web.xml to *.xhtml but it will not, I added the library primefaces in the lib of WEB-INF, but the components do not appear.

My web.xml.

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-
app_3_0.xsd">
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value><!--Developmente or Products-->
</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>/faces/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
    30
 </session-timeout>
</session-config>
 <welcome-file-list>
<welcome-file>faces/index.xhtml</welcome-file>
 </welcome-file-list>

My.xhtml Criminal Record

<?xml version='1.0' encoding='UTF-8' ?>
 <!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://xmlns.jcp.org/jsf/html"
  xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
  xmlns:a="http://xmlns.jcp.org/jsf/passthrough"
   xmlns:p="http://primefaces.org/ui"
   xmlns:b="http://bootsfaces.net/ui"
  xmlns:f="http://xmlns.jcp.org/jsf/core">
  <h:head>
     <title>Cadastro de Cliente</title>

    <link type="text/css" rel="stylesheet" href="#
 {request.contextPath}/cssPrimeFaces/default.css" />
     <link type="text/css" rel="stylesheet" href="#
 {request.contextPath}/cssPrimeFaces/principal.css" 
    />
         <link type="text/css" rel="stylesheet" href="#
    {request.contextPath}/cssPrimeFaces/theme.css" />

    <style type="text/css">
           .ui-layout-north {
                  z-index:20 !important;
                 overflow:visible !important;;
            }

          .ui-layout-north .ui-layout-unit-content {
                overflow:visible !important;
           }
    </style>
    </h:head>
   <h:body>
      <h:form>
      <h:panelGroup layout="block" id="header">
        <ui:insert name="top">
         <h:panelGroup id="header_top">
             <h:panelGroup layout="block" styleClass="container">
                <b:column col-sm="6">
        <h:panelGroup layout="block" styleClass="contactinfo">
       <ul class="nav nav-pills">
        <li><i class="fa fa-phone"></i> +2 95 01 88 821</li>
        <li><i class="fa fa-envelope"></i> [email protected]</li>    
         </ul>     
    </h:panelGroup>  
 </b:column>
                    <b:column col-sm="6">
                 <h:panelGroup layout="block" styleClass="social-icons pull-right">
        <ul class="nav navbar-nav">
<li><i class="fa fa-facebook" action="" ></i></li>
<li><i class="fa fa-twitter" action=""></i></li>
<li><i class="fa fa-linkedin" action=""></i></li>
<li><i class="fa fa-dribbble" action=""></i></li>
<li><i class="fa fa-google-plus" action=""></i></li>
</ul>
                     </h:panelGroup>
             </b:column>
             </h:panelGroup>    
         </h:panelGroup> 
        </ui:insert>
    <h:panelGroup layout="block" styleClass="header-middle"><!--header-middle-->
            <h:panelGroup layout="block" styleClass="container">
     <b:row>
         <b:column col-sm="4">
             <h:panelGroup layout="block" styleClass="logo_pull_left">
                 <h:commandLink action="index.xhtml">
               <h:graphicImage library="imagens" name="winnerlogo.png"/> 
                 </h:commandLink>

          </h:panelGroup>

         </b:column>
          <b:column col-sm="8">
             <h:panelGroup layout="block" styleClass="shop-menu pull-right">

    <ul class="nav navbar-nav">
                    <li><i class="fa fa-user"></i><h:commandLink action="#{navegacao.redirecionarConta()}" value="Minha Conta" /></li>
                    <li><i class="fa fa-shopping-cart"></i><h:commandLink action="#{navegacao.redirecionarCarrinho()}" value="Carrinho de compras" /></li>

    <li><i class="fa fa-lock"></i><h:commandLink action="#{navegacao.Login()}" value="Login" /></li>
    </ul>

    </h:panelGroup>

         </b:column>
     </b:row>
            </h:panelGroup>

<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>

          </b:column>
        <b:column col-sm="3">


            <h:inputText value="#{bean.value}" id="busca" class="search_box" />
        </b:column>

                  <b:column col-sm="4"> 

    <h2>Informações Pessoais</h2>
    <h:panelGroup layout="block" styleClass="login-form2">
        <h:outputLabel for="Email" styleClass="Email" value="Email:  "/> <p:inputText styleClass="email2"  value="#{cliente.cli.email}"/><br/>
        <h:outputLabel for="Nome" value="Nome:  " id="nome"/><p:inputText styleClass="nome"  value="#{cliente.cli.nome}"/>

 <p:commandButton value="Salvar " styleClass="salvar"  action="#{cliente.cadastroCliente()}"  /> <p:commandButton value="Salvar " styleClass="salvar" action="#{clienteBean2.Cadastrar()}" /> <p:commandButton value="Salvar " styleClass="salvar" action="#{clienteBean2.Cadastrar()}" /> 






                    </h:panelGroup> 
                </b:column>

                <b:column col-sm="4">
                    <h:panelGroup layout="block" styleClass="login-form">     
                        <h:outputLabel for="rua" value="Rua: "/> <p:inputText id="rua" styleClass="rua" value="#{cliente2.rua}"/><br/>
                        <h:outputLabel for="numero" value="Numero: "/> <p:inputText id="numero" styleClass="numero" value="#{cliente2.numero}"/><br/>
                        <h:outputLabel for="bairro" value="Bairro: "/> <p:inputText id="bairro" styleClass="bairro" value="#{cliente2.bairro}"/><br/>



     </b:row>
 </h:panelGroup>
  </h:panelGroup><!--header-bottom-->
    </h:panelGroup>



   <h:panelGroup layout="block"  styleClass="footer">

    <h:panelGroup layout="block"  styleClass="footer-top">
        <h:panelGroup layout="block"  styleClass="container">

          <b:row>
                    <b:column col-sm="1"></b:column>          
        <b:column col-sm="8">
        <h:panelGroup layout="block"  styleClass="companyinfo">

        <h2><h:panelGroup  styleClass="">e</h:panelGroup>-shopper</h2>

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit,sed do eiusmod tempor</p>
</h:panelGroup>
        </b:column>  



                 <b:column col-sm="3">
            <h:panelGroup layout="block"  styleClass="address">

    <img src="images/home/map.png" alt="" />
<p>505 S Atlantic Ave Virginia Beach, VA(Virginia)</p>
    </h:panelGroup>
         </b:column>

            </b:row> 

           </h:panelGroup>
           </h:panelGroup>


        <h:panelGroup layout="block"  styleClass="footer-widget">
       <h:panelGroup layout="block"  styleClass="container">

          <b:row>
           <b:column span="2">
             <h:panelGroup layout="block"  styleClass="single-widget">

        <h2>Serviços</h2>
        <ul class="nav nav-pills nav-stacked">
        <li>Online Help</li>
        <li>Contact Us</li>
        <li>Order Status</li>
        <li>Change Location</li>
        <li>FAQ’s</li>
        </ul>

                    </h:panelGroup>
    </b:column>
              <b:column col-sm="3">
  <h:panelGroup layout="block"  styleClass="single-widget">
    <h2>Categorias</h2>
            <ul class="nav nav-pills nav-stacked">
        <li><a href="#">T-Shirt</a></li>
        <li><a href="#">Mens</a></li>
        <li><a href="#">Womens</a></li>
        <li><a href="#">Gift Cards</a></li>
        <li><a href="#">Shoes</a></li>
        </ul>
         </h:panelGroup>
</b:column>
    <b:column col-sm="2">
                <h:panelGroup layout="block"  styleClass="single-widget">
                <h2>Politicas</h2>
        <h:panelGroup layout="block"  styleClass="single-widget">
    <ul class="nav nav-pills nav-stacked">
        <li><a href="#">Terms de Uso</a></li>
        <li><a href="#">Politica de Privacidade</a></li>
        </ul>
                        </h:panelGroup>
                </h:panelGroup>
            </b:column>
        <b:column col-sm="2">
                    <h:panelGroup layout="block"  styleClass="single-widget">
        <h2>Sobre</h2>
        <ul class="nav nav-pills nav-stacked">
        <li><a href="#">Company Information</a></li>
        <li><a href="#">Careers</a></li>
        <li><a href="#">Store Location</a></li>
        <li><a href="#">Affillate Program</a></li>
        <li><a href="#">Copyright</a></li>
        </ul>
        </h:panelGroup>
                    </b:column>


        </b:row>
    </h:panelGroup>
</h:panelGroup>

        <h:panelGroup layout="block"  styleClass="footer">
        <h:panelGroup layout="block"  styleClass="footer-bottom">
            <h:panelGroup layout="block"  styleClass="container">


                <b:row>

<p class="pull-left">Copyright © 2013 E-SHOPPER Inc. All rights reserved.</p>
<p class="pull-right">Designed by <span><a target="_blank" 
        href="http://www.themeum.com">Themeum</a></span></p>
        </b:row>
     </h:panelGroup>

      </h:panelGroup>


  </h:panelGroup>
      </h:panelGroup>
   </h:form>
  </h:body>
 </html>

Like my page this

inserir a descrição da imagem aqui

  • Did you read your post? You can’t understand the code. Is no indentation, the same code is broken into several blocks of code formatting, has strange content in the middle of posting... This makes it difficult to help.. Edit the question including the indented code. It doesn’t have to be perfection, but at least let it read a little better, please. Then I believe you will have more change to get the desired answer :-)

  • ready I have now edited this most visible

1 answer

0

Try adding the jar here...

On top of the project click with the right mouse button and go to Build Path next Configure Build Path, on the screen that opened, on the tab Libraries goes on Add External Jars.., and adds the jar of prime faces. After you have added the jar, in the column on the left goes Deployment Assembly, click on the button Add.. and then click on Java Build Path Entries and selects the jar from the prime faces, and after having added the jar goes on Apply and ready.

  • then man I added the jar in the web-info lib

  • but I don’t know why the compositions don’t appear, and sorry I didn’t understand add the jar here ?

  • Yeah, just paste the jar into the right non-fat lib. Add the jar by this step and test.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.