title: JSF tag is not working on *.xhtml but working *.jsp file
body: <p>I am trying to run simple application using JSF 2.2, Netbeans 7.3 and GlassFish v2.</p>
  
  <p><code>index.xhtml</code>:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8' ?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"
     xmlns:h="http://xmlns.jcp.org/jsf/html"&gt;
      &lt;h:head&gt;
          &lt;title&gt;Facelet Title&lt;/title&gt;
      &lt;/h:head&gt;
      &lt;h:body&gt;
         &lt;b&gt;Hello from Facelets&lt;/b&gt;
         &lt;h:form id="this"&gt;
             &lt;h:outputText value="This is"/&gt;
         &lt;/h:form&gt;
      &lt;/h:body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><code>web.xml</code>:</p>
  
  <pre><code>&lt;web-app version="2.5" 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_2_5.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;/faces/*&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;faces/index.xhtml&lt;/welcome-file&gt;
      &lt;/welcome-file-list&gt;  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>Output:</p>
  
  <hr>
  
  <p><img src="https://i.stack.imgur.com/hGh5q.png" alt="Output file"></p>
  
  <hr>
  
  <p>The <code>&lt;b&gt;Hello from Facelets&lt;/b&gt;</code> is working but <code>&lt;h:outputText value="this is "/&gt;</code> is not working. How is this caused and how can I solve it?</p>
  
  <p>I searched here and found the following questions: </p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/3002047/jsf-form-is-not-showing-up">JSF Form is not showing up</a></li>
  <li><a href="https://stackoverflow.com/questions/17424292/hinputtext-not-working-with-multiple-forms-in-jsf2-2">h:inputtext not working with multiple forms in JSF2.2</a></li>
  </ul>
  
  <p>However, the answers did not solve myproblem. </p>
  
  <hr>
  
  <p><strong>Update</strong>: @Xtreme Biker, when I changed like you said I got following exception:</p>
  
  <p><img src="https://i.stack.imgur.com/6iW1C.png" alt="This is exception "></p>
  
  <p><strong>Note:</strong> If I used <code>*.jsp</code> instead of <code>*.xhtml</code> it works. But when I make my <code>index</code> file extension <code>xhtml</code> it is not working.</p>