title: How to get current outcome in JSF 2
body: <p>I would like to get outcome value from navigation rules into a request scoped JSF 2 bean. How can I do that?</p>
  
  <p>For example, when I press on a <code>&lt;h:link outcome="contacts"&gt;</code> and end up in the contacts page, then I would like to get the outcome <code>"contacts"</code> in the backing bean associated with the navigation menu.</p>
  
  <p>faces-config.xml</p>
  
  <pre><code>&lt;navigation-rule&gt;
      ...
      &lt;navigation-case&gt;
          &lt;from-outcome&gt;contacts&lt;/from-outcome&gt;
          &lt;to-view-id&gt;/pages/contacts.xhtml&lt;/to-view-id&gt;
      &lt;/navigation-case&gt;
      ...
  &lt;/navigation-rule&gt;
  </code></pre>