title: Expression Language not executing in facelets template and client
body: <p>How do I get the EL below to execute?  I'm using Glassfish and Netbeans.  I tried a few variations on the web.xml, but I'm not exactly sure that's the problem.  Perhaps it's the imports for the client or template?</p>
  
  <p>output:</p>
  
  <pre><code>thufir@dur:~$ lynx http://localhost:8080/HelloExpressionLanguage/ -dump
  &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:ui="http://xmlns.jcp.org/jsf/facelets"
        xmlns:h="http://xmlns.jcp.org/jsf/html"&gt;
  
      &lt;body&gt;
  
          &lt;ui:composition template="./template.xhtml"&gt;
  
              &lt;ui:define name="top"&gt;
                  top
              &lt;/ui:define&gt;
  
              &lt;ui:define name="content"&gt;
                  expression language not evaluating?
                  &lt;h:outputLabel value="#{hello.hi(fred)}" /&gt;
              &lt;/ui:define&gt;
  
          &lt;/ui:composition&gt;
  
      &lt;/body&gt;
  &lt;/html&gt;thufir@dur:~$ 
  </code></pre>
  
  <p>web.xml:    </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"&gt;
      &lt;context-param&gt;
          &lt;!--
          &lt;param-name&gt;javax.faces.PROJECT_STAGE&lt;/param-name&gt;
          &lt;param-value&gt;Development&lt;/param-value&gt;
          --&gt;
          &lt;param-name&gt;com.sun.faces.expressionFactory&lt;/param-name&gt;
          &lt;param-value&gt;com.sun.el.ExpressionFactoryImpl&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;client.xhtml&lt;/welcome-file&gt;
      &lt;/welcome-file-list&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>client:</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:ui="http://xmlns.jcp.org/jsf/facelets"
        xmlns:h="http://xmlns.jcp.org/jsf/html"&gt;
  
      &lt;body&gt;
  
          &lt;ui:composition template="./template.xhtml"&gt;
  
              &lt;ui:define name="top"&gt;
                  top
              &lt;/ui:define&gt;
  
              &lt;ui:define name="content"&gt;
                  expression language not evaluating?
                  &lt;h:outputLabel value="#{hello.hi(fred)}" /&gt;
              &lt;/ui:define&gt;
  
          &lt;/ui:composition&gt;
  
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>template:</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:ui="http://xmlns.jcp.org/jsf/facelets"
        xmlns:h="http://xmlns.jcp.org/jsf/html"&gt;
  
      &lt;h:head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
          &lt;h:outputStylesheet name="./css/default.css"/&gt;
          &lt;h:outputStylesheet name="./css/cssLayout.css"/&gt;
          &lt;title&gt;Facelets Template&lt;/title&gt;
      &lt;/h:head&gt;
  
      &lt;h:body&gt;
  
          &lt;div id="top" class="top"&gt;
              &lt;ui:insert name="top"&gt;Top&lt;/ui:insert&gt;
          &lt;/div&gt;
  
          &lt;div id="content" class="center_content"&gt;
              &lt;ui:insert name="content"&gt;Content&lt;/ui:insert&gt;
          &lt;/div&gt;
  
      &lt;/h:body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>bean (using "gonna be deprecated" `@SessionScoped):</p>
  
  <pre><code>package pkg;
  
  import javax.faces.bean.SessionScoped;
  import javax.inject.Named;
  
  
  @Named
  @SessionScoped
  public class Hello {
  
      public Hello() {
      }
  
      public String hi(String name) {
          return "hi " + name;
      }
  
  }
  </code></pre>