title: JSF cannot display data in table
body: <p>I have this managed bean which takes two values from database's table</p>
  
  <pre><code>import java.io.Serializable;
  import javax.enterprise.context.SessionScoped;
  // or import javax.faces.bean.SessionScoped;
  import javax.inject.Named;
  /* include SQL Packages */
  import java.sql.Connection;
  import java.sql.PreparedStatement;
  import java.sql.ResultSet;
  import java.sql.SQLException;
  import java.util.ArrayList;
  import java.util.List;
  import javax.sql.DataSource;
  import javax.annotation.Resource;
  import javax.faces.context.FacesContext;
  import javax.inject.Inject;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpSession;
  // or import javax.faces.bean.ManagedBean;   
  
  import org.glassfish.osgicdi.OSGiService;
  
  @Named("DashboardController")
  @SessionScoped
  public class Dashboard implements Serializable {
  
      private String SessionTTL = null;
      private String MaxActiveUsers = null;
      private String stringone = null;
      private String stringtwo = null;
      private String SQL_Statement = null;
      private String Password;
      private String User;
  
      public Dashboard(){
      }
  
      /* Call the Oracle JDBC Connection driver */
      @Resource(name = "jdbc/Oracle")
      private DataSource ds;
  
      public String getSessionTTL() {
          return SessionTTL;
      }
  
      public void setSessionTTL(String SessionTTL) {
          this.SessionTTL = SessionTTL;
      }
  
      public String getMaxActiveUsers() {
          return MaxActiveUsers;
      }
  
      public void setMaxActiveUsers(String MaxActiveUsers) {
          this.MaxActiveUsers = MaxActiveUsers;
      }
  
  
      //connect to DB and get settings values
      public List&lt;Dashboard&gt; getDashboardList()throws SQLException{
  
          List&lt;Dashboard&gt; list = new ArrayList&lt;Dashboard&gt;();
  
          if(ds == null) {
                  throw new SQLException("Can't get data source");
          }
  
          Connection conn = ds.getConnection(); 
  
          if(conn == null) {
                  throw new SQLException("Can't get database connection");
          }
  
          PreparedStatement ps = conn.prepareStatement("SELECT * from GLOBALSETTINGS");
  
          try{
              //get data from database        
              ResultSet result = ps.executeQuery();
              while (result.next()){
                  Dashboard cust = new Dashboard();
                  cust.setSessionTTL(result.getString("SessionTTL"));
                  cust.setMaxActiveUsers(result.getString("MaxActiveUsers"));
                  list.add(cust);
              }
          }
          catch(Exception e1){
              // Log the exception.
          }
          finally{
              try{
                  ps.close();
                  conn.close();
              }
              catch(Exception e2){
                  // Log the exception.
              }
          }
          return list; 
      }
  }
  </code></pre>
  
  <p>This is the code of the JSF table which must display the values:</p>
  
  <pre><code>                    &lt;h:dataTable id="books"
                               columnClasses="list-column-center,
                               list-column-right, list-column-center,
                               list-column-right" headerClass="list-header"
                               rowClasses="list-row" styleClass="list-
                               background" value="#{DashboardController.getDashboardList()}" var="store"&gt;   
                      &lt;h:column&gt;
                          &lt;f:facet name="header"&gt;
                            &lt;h:outputText  value="#{store.SessionTTL}"/&gt;
                          &lt;/f:facet&gt;
                           &lt;h:outputText value="#{store.SessionTTL}"/&gt;
                      &lt;/h:column&gt;
                      &lt;h:column&gt;
                          &lt;f:facet name="header"&gt;
                            &lt;h:outputText  value="#{store.MaxActiveUsers}"/&gt;
                          &lt;/f:facet&gt;
                           &lt;h:outputText value="#{store.MaxActiveUsers}"/&gt;
                      &lt;/h:column&gt;
  
                  &lt;/h:dataTable&gt; 
  </code></pre>
  
  <p>The problem is that I get this error when I try to run the JSF page:</p>
  
  <pre><code>javax.el.PropertyNotFoundException: /Settings.xhtml @82,69 value="#{store.SessionTTL}": The class 'com.DX_57.SM_57.Dashboard' does not have the property 'SessionTTL'.
      at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:111)
      at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
      at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)
      at javax.faces.component.UIOutput.getValue(UIOutput.java:169)
      at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:205)
      at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:355)
      at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:164)
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
      at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:312)
      at com.sun.faces.renderkit.html_basic.TableRenderer.renderRow(TableRenderer.java:384)
      at com.sun.faces.renderkit.html_basic.TableRenderer.encodeChildren(TableRenderer.java:161)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1757)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:402)
      at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
      at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
      at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
      at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
      at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Thread.java:722)
  </code></pre>
  
  <p>I have mistake somewhere but I cannot find it.</p>