title: JSF creates new instance of the same class for each el expression in facelets
body: <p>I have a login page in a web application project:</p>
  
  <pre><code>&lt;h:form&gt;
      &lt;h:messages /&gt;
      &lt;h:inputText label="Username" value="#{login.username}" required="true" /&gt;
      &lt;h:inputSecret label="Password" value="#{login.pass}" required="true" /&gt;
      &lt;h:commandButton value="Accedi" action="#{login.check()}"  /&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>When I submit the form, jsf creates three instances of Login class (I've noticed this behavior using debugger). In this way I can't use the username and password in Login.check() method: they are both null.</p>
  
  <p>Besides I've tested another more complex project I've created some time ago and it works fine: only one instance is created. I don't understand where I'm wrong.</p>