Read the root cause of the exception to understand the reason (and, essentially, this is also the solution):
Raised: javax.el.ELException: cannot convert userLogin of type java.lang.String to class model.businessLogic.UserLogin
So you referred to the String instance as a managed bean instead of the UserLogin instance.
And indeed, your managed property value is not valid:
@ManagedProperty(value="userLogin")
It refers to plain vanilla String . Instead, you need to reference a managed bean:
@ManagedProperty(value="#{userLogin}")
Or, in short, since the value attribute is the default attribute of the annotation:
@ManagedProperty("#{userLogin}")
source share