I have the following ApplicationScoped bean
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Named;
@Named
@ApplicationScoped
public class UserService implements Serializable {...
And I am trying to inject it into a web filter
import javax.inject.Inject;
import javax.servlet.Filter;
@WebFilter("/admin/*")
public class AdminFilter implements Filter{
@Inject
private UserService userService;
The injected userService is null in the doFilter method. I can't figure out what I am missing. Thanks in advance!