title: JSF tags not rendering - FacesServlet not working maybe?
body: <p>I am just getting started with JSF 2.0 and I'm stuck on a problem at the very beginning. JSF tags are not parsed.</p>
  
  <p>Below are some details. Hope someone can help because none of the related SO questions have been able to solve my problem.</p>
  
  <p><strong>hello.jsp</strong></p>
  
  <pre><code>&lt;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:p="http://primefaces.org/ui"&gt;
  
      &lt;h:head&gt;
  
      &lt;/h:head&gt;
  
      &lt;h:body&gt;
      &lt;f:view&gt;
          asd
          &lt;h:inputText value="asd" label="UserName"&gt;&lt;/h:inputText&gt;
      &lt;/f:view&gt;
      &lt;/h:body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>What I see when I navigate to <code>http://localhost:8080/JSFDeneme/pages/hello.jsp</code></strong></p>
  
  <p>Only the plaintext <code>asd</code></p>
  
  <p><strong>View source of <code>http://localhost:8080/JSFDeneme/pages/hello.jsp</code></strong></p>
  
  <p>Exactly the same as the contents of <code>hello.jsp</code></p>
  
  <pre><code>&lt;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:p="http://primefaces.org/ui"&gt;
  
      &lt;h:head&gt;    
      &lt;/h:head&gt;    
      &lt;h:body&gt;
      &lt;f:view&gt;asd
          &lt;h:inputText value="asd" label="UserName"&gt;&lt;/h:inputText&gt;
          &lt;/f:view&gt;
      &lt;/h:body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>web.xml</strong></p>
  
  <pre class="lang-xml prettyprint-override"><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_3_0.xsd" 
           id="WebApp_ID" 
           version="3.0"&gt;
    &lt;display-name&gt;JSFDeneme&lt;/display-name&gt;
    &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
      &lt;welcome-file&gt;index.htm&lt;/welcome-file&gt;
      &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.html&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.htm&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.jsp&lt;/welcome-file&gt;
      &lt;welcome-file&gt;hello.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;url-pattern&gt;/pages/*&lt;/url-pattern&gt;
      &lt;url-pattern&gt;*.jsf&lt;/url-pattern&gt;
    &lt;/servlet-mapping&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;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;description&gt;
      This parameter tells MyFaces if javascript code should be allowed in
      the rendered HTML output.
      If javascript is allowed, command_link anchors will have javascript code
      that submits the corresponding form.
      If javascript is not allowed, the state saving info and nested parameters
      will be added as url parameters.
      Default is 'true'&lt;/description&gt;
      &lt;param-name&gt;org.apache.myfaces.ALLOW_JAVASCRIPT&lt;/param-name&gt;
      &lt;param-value&gt;true&lt;/param-value&gt;
    &lt;/context-param&gt;
    &lt;context-param&gt;
      &lt;description&gt;
      If true, rendered HTML code will be formatted, so that it is 'human-readable'
      i.e. additional line separators and whitespace will be written, that do not
      influence the HTML code.
      Default is 'true'&lt;/description&gt;
      &lt;param-name&gt;org.apache.myfaces.PRETTY_HTML&lt;/param-name&gt;
      &lt;param-value&gt;true&lt;/param-value&gt;
    &lt;/context-param&gt;
    &lt;context-param&gt;
      &lt;param-name&gt;org.apache.myfaces.DETECT_JAVASCRIPT&lt;/param-name&gt;
      &lt;param-value&gt;false&lt;/param-value&gt;
    &lt;/context-param&gt;
    &lt;context-param&gt;
      &lt;description&gt;
      If true, a javascript function will be rendered that is able to restore the
      former vertical scroll on every request. Convenient feature if you have pages
      with long lists and you do not want the browser page to always jump to the top
      if you trigger a link or button action that stays on the same page.
      Default is 'false'
  &lt;/description&gt;
      &lt;param-name&gt;org.apache.myfaces.AUTO_SCROLL&lt;/param-name&gt;
      &lt;param-value&gt;true&lt;/param-value&gt;
    &lt;/context-param&gt;
    &lt;listener&gt;
      &lt;listener-class&gt;org.apache.myfaces.webapp.StartupServletContextListener&lt;/listener-class&gt;
    &lt;/listener&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p><strong>faces-config.xml</strong></p>
  
  
  
  <pre><code>&lt;faces-config
      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-facesconfig_2_0.xsd"
      version="2.0"&gt;
  &lt;/faces-config&gt;
  </code></pre>
  
  <p><strong>What I have in <code>WEB-INF/lib</code></strong></p>
  
  <ul>
  <li>JSF 2.0 (Apache Myfaces JSF Core-2.0 API 2.0.2) - Eclipse downloaded that</li>
  <li>jstl-api-1.2.jar</li>
  <li>jstl-impl-1.2.jar</li>
  <li>primefaces-3.0 jars</li>
  </ul>
  
  <p><strong>What Tomcat prints to console when I restart the server and navigate to the page</strong></p>
  
  <p>There seems nothing odd and no mention of <code>FacesServlet</code>?</p>
  
  <pre><code>06.Oca.2012 22:26:55 org.apache.catalina.core.AprLifecycleListener init
  INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\glassfish3\jdk\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\apache-ant-1.8.2\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\QuickTime\QTSystem\;.
  06.Oca.2012 22:26:56 org.apache.tomcat.util.digester.SetPropertiesRule begin
  WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:AjaxDenemeleri' did not find a matching property.
  06.Oca.2012 22:26:56 org.apache.tomcat.util.digester.SetPropertiesRule begin
  WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:RPGW_RestAPI' did not find a matching property.
  06.Oca.2012 22:26:56 org.apache.tomcat.util.digester.SetPropertiesRule begin
  WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:JSFDeneme' did not find a matching property.
  06.Oca.2012 22:26:56 org.apache.coyote.AbstractProtocol init
  INFO: Initializing ProtocolHandler ["http-bio-8080"]
  06.Oca.2012 22:26:56 org.apache.coyote.AbstractProtocol init
  INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
  06.Oca.2012 22:26:56 org.apache.catalina.startup.Catalina load
  INFO: Initialization processed in 680 ms
  06.Oca.2012 22:26:56 org.apache.catalina.core.StandardService startInternal
  INFO: Starting service Catalina
  06.Oca.2012 22:26:56 org.apache.catalina.core.StandardEngine startInternal
  INFO: Starting Servlet Engine: Apache Tomcat/7.0.22
  06.Oca.2012 22:26:56 com.sun.jersey.api.core.PackagesResourceConfig init
  INFO: Scanning for root resource and provider classes in the packages:
    sample.hello.resources
  06.Oca.2012 22:26:56 com.sun.jersey.api.core.ScanningResourceConfig logClasses
  INFO: Root resource classes found:
    class sample.hello.resources.HelloResource
    class sample.hello.resources.ContactsResource
  06.Oca.2012 22:26:56 com.sun.jersey.api.core.ScanningResourceConfig init
  INFO: No provider classes found.
  06.Oca.2012 22:26:57 com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
  INFO: Initiating Jersey application, version 'Jersey: 1.10 11/02/2011 03:53 PM'
  06.Oca.2012 22:27:00 org.apache.catalina.core.StandardContext addApplicationListener
  INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
  06.Oca.2012 22:27:00 org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
  INFO: No context init parameter 'org.apache.myfaces.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON' found, using default value false
  06.Oca.2012 22:27:00 org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
  INFO: No context init parameter 'org.apache.myfaces.RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS' found, using default value false
  06.Oca.2012 22:27:00 org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
  INFO: No context init parameter 'org.apache.myfaces.SAVE_FORM_SUBMIT_LINK_IE' found, using default value false
  06.Oca.2012 22:27:00 org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
  INFO: No context init parameter 'org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS' found, using default value true
  06.Oca.2012 22:27:00 org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
  INFO: No context init parameter 'org.apache.myfaces.RENDER_VIEWSTATE_ID' found, using default value true
  06.Oca.2012 22:27:00 org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
  INFO: No context init parameter 'org.apache.myfaces.STRICT_XHTML_LINKS' found, using default value true
  06.Oca.2012 22:27:00 org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
  INFO: No context init parameter 'org.apache.myfaces.RENDER_FORM_SUBMIT_SCRIPT_INLINE' found, using default value false
  06.Oca.2012 22:27:00 org.apache.myfaces.shared_impl.config.MyfacesConfig getLongInitParameter
  INFO: No context init parameter 'org.apache.myfaces.CONFIG_REFRESH_PERIOD' found, using default value 2
  06.Oca.2012 22:27:00 org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
  INFO: No context init parameter 'org.apache.myfaces.VIEWSTATE_JAVASCRIPT' found, using default value false
  06.Oca.2012 22:27:00 org.apache.myfaces.shared_impl.config.MyfacesConfig getStringInitParameter
  INFO: No context init parameter 'org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS' found, using default value auto
  06.Oca.2012 22:27:00 org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
  INFO: No context init parameter 'org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE' found, using default value false
  06.Oca.2012 22:27:00 org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
  INFO: No context init parameter 'org.apache.myfaces.VALIDATE_XML' found, using default value false
  06.Oca.2012 22:27:00 org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
  INFO: No context init parameter 'org.apache.myfaces.WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG' found, using default value true
  06.Oca.2012 22:27:00 org.apache.myfaces.shared_impl.config.MyfacesConfig createAndInitializeMyFacesConfig
  INFO: Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensionsFilter are disabled now.
  06.Oca.2012 22:27:00 org.apache.myfaces.config.FacesConfigurator feedStandardConfig
  INFO: Reading standard config META-INF/standard-faces-config.xml
  06.Oca.2012 22:27:00 org.apache.myfaces.config.FacesConfigurator addClassloaderConfigurations
  INFO: Reading config : jar:file:/D:/documents/code/java/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/JSFDeneme/WEB-INF/lib/primefaces-3.0.jar!/META-INF/faces-config.xml
  06.Oca.2012 22:27:00 org.apache.myfaces.config.FacesConfigurator getWebAppConfig
  INFO: Reading config /WEB-INF/faces-config.xml
  06.Oca.2012 22:27:00 org.apache.myfaces.config.FacesConfigurator startLib
  INFO: Starting up MyFaces-package : myfaces-api in version : 2.0.2 from path : file:/D:/documents/code/java/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/JSFDeneme/WEB-INF/lib/myfaces-api-2.0.2.jar
  06.Oca.2012 22:27:00 org.apache.myfaces.config.FacesConfigurator startLib
  INFO: Starting up MyFaces-package : myfaces-impl in version : 2.0.2 from path : file:/D:/documents/code/java/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/JSFDeneme/WEB-INF/lib/myfaces-impl-2.0.2.jar
  06.Oca.2012 22:27:00 org.apache.myfaces.config.FacesConfigurator startLib
  INFO: MyFaces-package : tomahawk not found.
  06.Oca.2012 22:27:00 org.apache.myfaces.config.FacesConfigurator startLib
  INFO: MyFaces-package : tomahawk12 not found.
  06.Oca.2012 22:27:00 org.apache.myfaces.config.FacesConfigurator startLib
  INFO: MyFaces-package : tomahawk-sandbox not found.
  06.Oca.2012 22:27:00 org.apache.myfaces.config.FacesConfigurator startLib
  INFO: MyFaces-package : tomahawk-sandbox12 not found.
  06.Oca.2012 22:27:00 org.apache.myfaces.config.FacesConfigurator startLib
  INFO: MyFaces-package : tomahawk-sandbox15 not found.
  06.Oca.2012 22:27:00 org.apache.myfaces.config.FacesConfigurator startLib
  INFO: MyFaces-package : myfaces-orchestra-core not found.
  06.Oca.2012 22:27:00 org.apache.myfaces.config.FacesConfigurator startLib
  INFO: MyFaces-package : myfaces-orchestra-core12 not found.
  06.Oca.2012 22:27:00 org.apache.myfaces.config.FacesConfigurator startLib
  INFO: MyFaces-package : trinidad-api not found.
  06.Oca.2012 22:27:00 org.apache.myfaces.config.FacesConfigurator startLib
  INFO: MyFaces-package : trinidad-impl not found.
  06.Oca.2012 22:27:00 org.apache.myfaces.config.FacesConfigurator startLib
  INFO: MyFaces-package : tobago not found.
  06.Oca.2012 22:27:00 org.apache.myfaces.config.FacesConfigurator startLib
  INFO: MyFaces-package : commons-el not found.
  06.Oca.2012 22:27:00 org.apache.myfaces.config.FacesConfigurator startLib
  INFO: MyFaces-package : jsp-api not found.
  06.Oca.2012 22:27:00 org.apache.myfaces.util.ExternalSpecifications isBeanValidationAvailable
  INFO: MyFaces Bean Validation support disabled
  06.Oca.2012 22:27:00 org.apache.myfaces.config.annotation.DefaultAnnotationProvider webClasses
  WARNING: AnnotationConfigurator does not found classes for annotations in /WEB-INF/classes/ . This could happen because maven jetty plugin is used (goal jetty:run). Try configure org.apache.myfaces.annotation.SCAN_PACKAGES init parameter or use jetty:run-exploded instead.
  06.Oca.2012 22:27:00 org.apache.myfaces.application.ApplicationImpl getProjectStage
  INFO: Couldn't discover the current project stage, using Production
  06.Oca.2012 22:27:00 org.apache.myfaces.config.FacesConfigurator handleSerialFactory
  INFO: Serialization provider : class org.apache.myfaces.shared_impl.util.serial.DefaultSerialFactory
  06.Oca.2012 22:27:00 org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory getLifecycleProvider
  INFO: Using LifecycleProvider java.lang.String
  06.Oca.2012 22:27:01 org.apache.myfaces.webapp.AbstractFacesInitializer initFaces
  INFO: ServletContext 'D:\documents\code\java\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\JSFDeneme\' initialized.
  06.Oca.2012 22:27:01 org.primefaces.webapp.PostConstructApplicationEventListener processEvent
  INFO: Running on PrimeFaces 3.0
  06.Oca.2012 22:27:01 org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["http-bio-8080"]
  06.Oca.2012 22:27:01 org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["ajp-bio-8009"]
  06.Oca.2012 22:27:01 org.apache.catalina.startup.Catalina start
  INFO: Server startup in 4958 ms
  </code></pre>
  
  <p>Any help appreciated.</p>