Read the exception's root cause to understand the cause (and inherently thus also the solution):
Caused by: javax.el.ELException: Cannot convert userLogin of type class java.lang.String to class model.businessLogic.UserLogin
Thus, you were referencing a String
instance as a managed bean instead of UserLogin
instance.
And indeed, your managed property value is invalid:
@ManagedProperty(value="userLogin")
It references a plain vanilla String
. You need to reference a managed bean instead:
@ManagedProperty(value="#{userLogin}")
Or, shorter, as the value
attribtue is the annotation's default attribute:
@ManagedProperty("#{userLogin}")