title: Target Unreachable, identifier 'bean' resolved to null error
body: <p>I'm trying to build simple JSF app using Glassfish as app server, and it's starting but after that this error is happening:</p>
  
  <pre><code>javax.el.PropertyNotFoundException: /index.xhtml @10,75 value="#{bean.genre}": Target Unreachable, identifier 'bean' resolved to null
  at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:100)
  at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:95)....
  </code></pre>
  
  <p>I tried to change my Bean annotations to @Model and tried different kind of Scopes but that didn't helped.</p>
  
  <p>this is my index.xhtml page:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns="http://www.w3c.org/1999/xhtml"
    xmlns:h="http://xmlns.jcp.org/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;h:form id="genreForm"&gt;
          &lt;h:outputLabel for="genre" value="genre" /&gt;
          &lt;h:inputText id="genre" value="#{bean.genre}" label="genre" /&gt;
          &lt;br/&gt;&lt;br/&gt;
          &lt;p:commandButton action="#{bean.addGenre}" update="genreList"
                           value="Add genre" icon="ui-icon-check" style="margin:0"/&gt;
          &lt;br/&gt;
          &lt;br/&gt;
          &lt;h:dataTable  id="genreList" value="#{bean.getGenreList()}" var="g" border="1"&gt;
              &lt;h:column&gt;
                  &lt;f:facet name="header"&gt;
                      Genre id
                  &lt;/f:facet&gt;
                  #{g.genreId}
              &lt;/h:column&gt;
              &lt;h:column&gt;
                  &lt;f:facet name="header"&gt;
                      Name
                  &lt;/f:facet&gt;
                  #{g.genre}
              &lt;/h:column&gt;
          &lt;/h:dataTable&gt;
      &lt;/h:form&gt;
  &lt;/h:body&gt;
  </code></pre>
  
  <p></p>
  
  <p>this is my Bean:</p>
  
  <pre><code>@ManagedBean(name = "Bean", eager = true)
  @SessionScoped
  public class Bean {
  
  private int genreId;
  private String genre;
  
  public void addGenre() {
      GenreDAO dao = new GenreDAOImpl();
      Genre myGenre = new Genre();
      myGenre.setGenre(genre);
      dao.save(myGenre);
  }
  
  public String getGenre() {
      return genre;
  }
  
  public void setGenre(String genre) {
      this.genre = genre;
  }
  
  public int getGenreId() {
      return genreId;
  }
  
  public void setGenreId(int genreId) {
      this.genreId = genreId;
  }
  
  public List&lt;Genre&gt; getGenreList() {
      GenreDAO dao = new GenreDAOImpl();
      List&lt;Genre&gt; list = dao.findAll();
      return list;
  }
  }
  </code></pre>