title: FacesContext#getCurrentInstance() returns null in Filter#doFilter()
body: <p>Inside a </p>
  
  <pre><code>public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain)
  </code></pre>
  
  <p>I wanted to get the session using</p>
  
  <pre><code>FacesContext.getCurrentInstance().getExternalContext().getSession(false);
  </code></pre>
  
  <p>But I realised that <code>FacesContext.getCurrentInstance()</code> returns <code>null</code>. I know that I can get the session using <code>((HttpServletRequest) req).getSession(false)</code> instead, but my concrete question is: <em>why</em> is the faces context <code>null</code> in the <code>doFilter()</code> method?</p>
  
  <p>I'm using MyFaces 1.1.</p>