title: ContextNotActiveException when OmniFaces ViewScoped bean is injected in servlet
body: <p>I've just updated a SessionScoped bean to OmniFaces (1.6.1) ViewScoped.  Everything seems to work except for the fact that I get the following Exception when my backing bean is injected into a Servlet that I'm using for the processing of an ajax request:</p>
  
  <pre><code>org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type org.omnifaces.cdi.ViewScoped
  </code></pre>
  
  <p>Some things to consider:</p>
  
  <p>1) The reason I have to inject a backing bean into a servlet is because I'm using jQuery's DataTables plugin, which (for server-side processing tables) requires an ajax request to retrieve table data.  So basically I can't use Primefaces' <code>&lt;p:remoteCommand..&gt;</code> or anything like that. </p>
  
  <p>2) From what I can tell, there aren't any extra GET requests to the view that would destroy and recreate the backing bean.</p>
  
  <p>Is there anything else that could cause this Exception?  Also, if this can't be done, is there another way to achieve what I'm doing?</p>