title: Method not found in JSF view
body: <p>How would I implement a login page using JSF? At the moment I have a registration form which stores the values in a variable in a Java Bean.<br>
  I now need to create a log in and log out page for this. How would I go about on achieving this ?</p>
  
  <p>Here is <strong>the code for the bean</strong> :</p>
  
  <pre><code>public String checkValidUser(String name) {
      dbData(name);
      if(name.equalsIgnoreCase(dbUsername)) {
          if(password.equals(dbPassword)) {
              return "success.xhtml";
          }
          else {
              return "fail.xhtml";
          }
      }
      else {
          return "fail.xhtml";
      }
  }
  </code></pre>
  
  <p>This is the <strong>LogIn Page</strong> :</p>
  
  <p></p>
  
  <pre><code>            &lt;h:outputText value="Forename"/&gt;
              &lt;h:inputText  id="forename" size="25" maxlength="30" required="true" 
                            requiredMessage="Please Enter Your Forename" 
                            validatorMessage="FR ERR" 
                            value="#{databaseLoginReg.name}"&gt;
                  &lt;f:validateLength maximum="30" minimum="1"/&gt;
              &lt;/h:inputText&gt;
              &lt;h:message errorClass="error" for="forename"/&gt;
  
  
              &lt;h:outputText  value="Enter Password"/&gt;
              &lt;h:inputSecret id="password" size="25" maxlength="16" required="true"
                             requiredMessage="Please Enter a Password"
                             validatorMessage="ERR"
                             value="#{databaseLoginReg.password}"&gt;
                  &lt;f:validateLength maximum="16" minimum="8"/&gt;
              &lt;/h:inputSecret&gt;
              &lt;h:message errorClass="error" for="password" /&gt;
  
  
              &lt;h:commandButton value="Log In" action="{databaseLoginReg.checkValidUser}"/&gt;
  </code></pre>
  
  <p>The error:  </p>
  
  <pre><code>javax.el.MethodNotFoundException: /logIn.xhtml @47,94 action="#{databaseLoginReg.checkValidUser}": Method not found: databaseLoginReg@77ff927f.checkValidUser()
  </code></pre>