Wednesday, August 21, 2013

injecting `sessionScoped` `managedBean` doesn't work

injecting `sessionScoped` `managedBean` doesn't work

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.

No comments:

Post a Comment