title: Simple primefaces application not working
body: <p>I am trying to build simple JSF application using primefaces but somehow primefaces components are not getting rendered properly. I dont understand what is going wrong. </p>
  
  <p>I am trying to display following Facelet file :</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui"&gt;
      &lt;h:head&gt;
          &lt;link type="text/css" 
                  rel="stylesheet"
                  href="/Themes/primefaces-dot-luv/theme.css" /&gt;
      &lt;/h:head&gt;
      &lt;h:body&gt;
          &lt;p:spinner value="100" style="height: 10px" /&gt;
          &lt;br/&gt;
          &lt;p:button value="Navigate"&gt;&lt;/p:button&gt;
      &lt;/h:body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I am using eclipse to run the app on tomcat server. When I run the application and view the page source in browser(firefox) I get following source :</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:p="http://primefaces.prime.com.tr/ui"&gt;
      &lt;head&gt;
          &lt;link type="text/css" rel="stylesheet" href="Themes/primefaces-dot-luv/theme.css" /&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;p:spinner value="100" style="height: 10px"&gt;&lt;/p:spinner&gt;
          &lt;br /&gt;
          &lt;p:button value="Navigate"&gt;&lt;/p:button&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I think PrimeFaces components are not getting rendered properly. Other JSF tags like <code>&lt;h:head&gt;</code> and <code>&lt;h:body&gt;</code> are converted correctly to <code>&lt;head&gt;</code> and <code>&lt;body&gt;</code> elements respectively. Only tags starting with <code>&lt;p:&gt;</code> are not converted.</p>
  
  <p>Following is my project structure :</p>
  
  <p><img src="https://i.stack.imgur.com/p1sz1.jpg" alt="enter image description here"></p>
  
  <p>My <code>web.xml</code> looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;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_2_5.xsd" id="WebApp_ID" version="2.5"&gt;
    &lt;display-name&gt;HelloJSF&lt;/display-name&gt;
    &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.jsp&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/faces/*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    &lt;context-param&gt;
      &lt;param-name&gt;primefaces.THEME&lt;/param-name&gt;
      &lt;param-value&gt;none&lt;/param-value&gt;
    &lt;/context-param&gt;
    &lt;context-param&gt;
      &lt;description&gt;State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2&lt;/description&gt;
      &lt;param-name&gt;javax.faces.STATE_SAVING_METHOD&lt;/param-name&gt;
      &lt;param-value&gt;client&lt;/param-value&gt;
    &lt;/context-param&gt;
    &lt;context-param&gt;
      &lt;param-name&gt;javax.servlet.jsp.jstl.fmt.localizationContext&lt;/param-name&gt;
      &lt;param-value&gt;resources.application&lt;/param-value&gt;
    &lt;/context-param&gt;
    &lt;listener&gt;
      &lt;listener-class&gt;com.sun.faces.config.ConfigureListener&lt;/listener-class&gt;
    &lt;/listener&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;*.jsf&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;*.faces&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>I am using eclipse , tomcat server. JSF 2 and primefaces 3 library.</p>
  
  <blockquote>
    <p>Hi, After some close inspection of entire project I found out that
    primefaces jar dowlonaded from site did not had any classes. Jar
    itself was corrupt. I downloaded same jar thrice then also jar was
    getting corrupt. So I downloaded zip file containing source and
    binaries and my application started working.</p>
  </blockquote>