title: JSF tags not being rendered as HTML
body: <p>I'm following the <strong>Java EE firstcup</strong> tutorial using <strong>Netbeans</strong> and <strong>Glassfish</strong>.</p>
  
  <p>When I execute the JSF web tier I've been instructed to code, the browser gets the same JSF markup coded in the .xhtml file, and the tags are not rendered as HTML tags. I know this by using the <em>view source code</em> in my browser.</p>
  
  <p>For example, for this code:</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"&gt;
      &lt;h:head&gt;
          &lt;title&gt;Page title here&lt;/title&gt;
      &lt;/h:head&gt;
      &lt;h:body&gt;
          &lt;h2&gt;
              &lt;h:outputText value="#{bundle.WelcomeMessage}" /&gt;
          &lt;/h2&gt;
      &lt;/h:body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The browser should get something like:</p>
  
  <pre><code>&lt;html ...&gt;
      &lt;head&gt;
          &lt;title&gt;Page title here&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;h2&gt;
              the welcome message goes here
          &lt;/h2&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Right?</p>
  
  <p>Well, my browser is getting jsf code (the first piece of code above) and not the html code (the second piece of code above).</p>
  
  <p>It seems to be a configuration problem in netbeans or glassfish but don't know what. Any ideas?</p>
  
  <hr>
  
  <p>This is my web.xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;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"&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;javax.faces.PROJECT_STAGE&lt;/param-name&gt;
          &lt;param-value&gt;Development&lt;/param-value&gt;
      &lt;/context-param&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;/firstcup/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
      &lt;session-config&gt;
          &lt;session-timeout&gt;
              30
          &lt;/session-timeout&gt;
      &lt;/session-config&gt;
      &lt;welcome-file-list&gt;
          &lt;welcome-file&gt;greetings.xhtml&lt;/welcome-file&gt;
      &lt;/welcome-file-list&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>This is my faces-config.xml file:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt;
  
  &lt;!-- =========== FULL CONFIGURATION FILE ================================== --&gt;
  
  &lt;faces-config version="2.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-facesconfig_2_0.xsd"&gt;
  
      &lt;application&gt;
          &lt;resource-bundle&gt;
              &lt;base-name&gt;firstcup.web.WebMessages&lt;/base-name&gt;
              &lt;var&gt;bundle&lt;/var&gt;
          &lt;/resource-bundle&gt;
          &lt;locale-config&gt;
              &lt;default-locale&gt;en&lt;/default-locale&gt;
              &lt;supported-locale&gt;es&lt;/supported-locale&gt;
          &lt;/locale-config&gt;
      &lt;/application&gt;
      &lt;navigation-rule&gt;
          &lt;from-view-id&gt;/greetings.xhtml&lt;/from-view-id&gt;
          &lt;navigation-case&gt;
              &lt;from-outcome&gt;success&lt;/from-outcome&gt;
              &lt;to-view-id&gt;/response.xhtml&lt;/to-view-id&gt;
          &lt;/navigation-case&gt;
      &lt;/navigation-rule&gt;
  &lt;/faces-config&gt;
  </code></pre>
  
  <hr>
  
  <p>Moreover:</p>
  
  <ul>
  <li>The url I'm entering in the browser is <a href="http://localhost:8081/firstcup/" rel="noreferrer">http://localhost:8081/firstcup/</a> but I've also tried: <a href="http://localhost:8081/firstcup/greetings.xhtml" rel="noreferrer">http://localhost:8081/firstcup/greetings.xhtml</a></li>
  <li>I've checked Glassfish logs and there's no information about not being able to load FacesServlet</li>
  </ul>