I have a Session scoped bean
import javax.faces.bean.SessionScoped;
import javax.inject.Named;
@Named
@SessionScoped
public class SessionBean implements Seri
Forget about managed beans. It won't work with a Filter that way. If you insist on using it then do it properly by follow the answer provided here:
How implement a login filter in JSF?
Now regarding CDI, if you problem is that a specific value is null and you have verified this by actually getting a NPE or so (Since for example Eclipse debugger sometimes get's it wrong). Then double check that you used correct SessionScoped like described by kolossus and also check what BalusC said (beans.xml).
A good way to see if CDI is working is to ask the manager for the bean. Put this debug code somewhere and try it:
@Inject
BeanManager manager;
@PostConstruct
private void test() {
Bean> bean = (Bean) manager.resolve(manager.getBeans("ANY_NAMED_BEAN_EL_NAME"));
System.out.println(bean);
}