title: externalContext.getSession(false) returns null
body: <p>My current platform is NB 7 rc 1 and I have a JSF 2 app with just one "managed bean". In time, I'm using Tomcat 7.0.34.</p>
  
  <p>Here is the code where the error occurs:</p>
  
  <pre><code> @ManagedBean
      @SessionScoped
      public class CopyController implements Serializable {
        private static final long serialVersionUID = 1L;
        private String pathBancoSentencas;
        private List&lt;Arquivo&gt; arquivosUpload;
        private HttpSession session;
        private List&lt;String&gt; listaPdfs;
  
        public List&lt;Arquivo&gt; getArquivosUpload() {
          return arquivosUpload;
        }
        public void setArquivosUpload(List&lt;Arquivo&gt; arquivosUpload) {
          this.arquivosUpload = arquivosUpload;
        }
  
        public CopyController() {
          arquivosUpload = new ArrayList&lt;Arquivo&gt;();
        }
  
        @PostConstruct
        public void doInit() {
            session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(false);  
      pathBancoSentencas = (String)session.getAttribute("DIRETORIO_TRABALHO");
    }  
  </code></pre>
  
  <p>And after processing the request, the routine calls a view like this:</p>
  
  <pre><code>            &lt;p:dataTable value="#{copyController.arquivosUpload}" var="arquivo" paginator="true" paginatorPosition="bottom" 
                           paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}"&gt;
                &lt;f:facet name="header"&gt;
                  Item processado
                &lt;/f:facet&gt;
                &lt;h:column&gt;
                  &lt;h:outputText value="#{arquivo.nome}" /&gt;
                &lt;/h:column&gt;
              &lt;/p:dataTable&gt;
  </code></pre>
  
  <p>However, the view is not displayed and this error occurs:</p>
  
  <pre><code>Caused by: java.lang.NullPointerException
      at br.jus.tjmg.dspace.copy.CopyController.doInit(CopyController.java:54)
      ... 70 more
  </code></pre>
  
  <p>Can someone help me?
  Thanks!</p>