0

I have a sessionScoped managedBean called UserManager, when I try to print #{UserManager.loggedIn} in the view, It work, but in my servlet-filter the injection of this managedBean doesn't work.

I tried to inject it like this:

@ManagedProperty(value="#{userManager}")
private UserManager userManager;

And in userManager I have null pointer.

ThunderPhoenix
  • 1,649
  • 4
  • 20
  • 47
  • Is this a javax.servlet.Filter? If so, how can it have session scoped fields? It is an application-wide instance that serves all user's requests. – Thilo Aug 21 '13 at 08:33
  • Yes it's a `javax.servlet.Filter`, I use it to check if the user is not logged in, so I redirect him to `login` page. – ThunderPhoenix Aug 21 '13 at 08:52

0 Answers0