title: jsf commandButton navigation javax.el.MethodNotFoundException
body: <p>Hi
  I'm trying to test jsf's navigation rules. </p>
  
  <p>My Person bean:</p>
  
  <pre><code>import javax.faces.bean.ManagedBean;
  import javax.faces.bean.SessionScoped;
  
  @ManagedBean
  @SessionScoped
  public class Person {
      private int id;
      private String name;
      private int age;
  
      public Person(){
          id = 1;
          name = "No name!";
          age = 0;
      }
  
      public int getId() {
          return id;
      }
  
      public void setId(int id) {
          this.id = id;
      }
  
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
      public int getAge() {
          return age;
      }
  
      public void setAge(int age) {
          this.age = age;
      }
  
      public String validate(){
          if(this.name.equals("Evgeny")){
              return "success";
          }else{
              return "failure";
          }
      }
  }
  </code></pre>
  
  <p>My faces-config.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;faces-config
      xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
      version="2.0"&gt;
  
      &lt;navigation-rule&gt;
          &lt;from-view-id&gt;/view.xhtml&lt;/from-view-id&gt;
          &lt;navigation-case&gt;
              &lt;from-outcome&gt;success&lt;/from-outcome&gt;
              &lt;to-view-id&gt;/destination.xhtml&lt;/to-view-id&gt;
          &lt;/navigation-case&gt;
          &lt;navigation-case&gt;
              &lt;from-outcome&gt;failure&lt;/from-outcome&gt;
              &lt;to-view-id&gt;/view.xhtml&lt;/to-view-id&gt;
          &lt;/navigation-case&gt;
      &lt;/navigation-rule&gt;
  
  &lt;/faces-config&gt;
  </code></pre>
  
  <p>And that's my form:</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"&gt;
  
  &lt;h:body&gt;
      &lt;h:form&gt;
          &lt;h:outputText&gt;Some Text!&lt;/h:outputText&gt;
          Name:   &lt;h:inputText value="#{person.name}" id="inName"&gt;&lt;/h:inputText&gt;
              &lt;br&gt;&lt;/br&gt;
          Age:    &lt;h:inputText value="#{person.age}" id="inAge"&gt;&lt;/h:inputText&gt; 
              &lt;br&gt;&lt;/br&gt;
          &lt;h:commandButton value="OK" action="#{person.validate}"&gt;&lt;/h:commandButton&gt;
      &lt;/h:form&gt;
  &lt;/h:body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>When I try to call person.validate I get <code>javax.el.MethodNotFoundException</code> Why that happens?
  I'm using MyFaces2.0.4 and Tomcat 7</p>