title: Faces Navigation not really working in JSF2
body: <p>I'm using JSF 2.0</p>
  
  <p>this is my faces-config.xml  </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!-- This file is not required if you don't need any extra configuration. --&gt;
  &lt;faces-config version="2.0" 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"&gt;
  
      &lt;navigation-rule&gt;
          &lt;from-view-id&gt;/pages/test/test.html&lt;/from-view-id&gt;
          &lt;navigation-case&gt;
              &lt;from-outcome&gt;write&lt;/from-outcome&gt;
              &lt;to-view-id&gt;/pages/test/test-write.html&lt;/to-view-id&gt;
          &lt;/navigation-case&gt;
  
      &lt;/navigation-rule&gt;
  
  &lt;/faces-config&gt;
  </code></pre>
  
  <p>The TestController.java</p>
  
  <pre><code>@ManagedBean(name="testController")
  @SessionScoped
  public class TestController implements Serializable {
  
      private static final long serialVersionUID = -3244711761400747261L; 
  
      public String test() {
  
  
          return "write?faces-redirect=true";
  }
  </code></pre>
  
  <p>in my test.xhtml file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      template="/WEB-INF/templates/default.xhtml"&gt;
      &lt;ui:define name="content"&gt;
              &lt;h:form&gt;
                      &lt;h:commandButton action="#{testController.test()}" value="test" /&gt;  
              &lt;/h:form&gt;
      &lt;/ui:define&gt;
  
  &lt;/ui:composition&gt;
  </code></pre>
  
  <p>and this is my web.xml</p>
  
  <pre><code>&lt;web-app 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-app_3_0.xsd"
      version="3.0"&gt;
      &lt;display-name&gt;Bachelor Demo&lt;/display-name&gt;      
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;*.html&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>What am I missing?</p>