title: get GET parameters in JSF's managed bean
body: <p>Can someone tell me how to catch parameters passed from URI in JSF's managed bean? 
  I have a navigation menu all nodes of which link to some navigation case. And i have two similar items there: Acquiring products and Issuing products. They have the same page but one different parameter: productType. I try to set it just by adding it to URL in "to-view-id" element like this:</p>
  
  <pre><code>&lt;navigation-case&gt;
      &lt;from-outcome&gt;acquiring|products&lt;/from-outcome&gt;
      &lt;to-view-id&gt;/pages/products/list_products.jspx?productType=acquiring&lt;/to-view-id&gt;
  &lt;/navigation-case&gt;
  
  &lt;navigation-case&gt;
      &lt;from-outcome&gt;issuing|products&lt;/from-outcome&gt;
      &lt;to-view-id&gt;/pages/products/list_products.jspx?productType=issuing&lt;/to-view-id&gt;
  &lt;/navigation-case&gt;
  </code></pre>
  
  <p>But i can't get this "productType" from my managed bean. I tried to get it through FacesContext like this:</p>
  
  <pre><code>FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("productType")
  </code></pre>
  
  <p>And like this:</p>
  
  <pre><code>HttpServletRequest request = (HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest();
      request.getParameter("productType");
  </code></pre>
  
  <p>And i tried to include it as a parameter of managed bean in faces-config.xml and then getting it through ordinary setter:</p>
  
  <pre><code> &lt;managed-bean&gt;
          &lt;managed-bean-name&gt;MbProducts&lt;/managed-bean-name&gt;
          &lt;managed-bean-class&gt;my.package.product.MbProducts&lt;/managed-bean-class&gt;
          &lt;managed-bean-scope&gt;request&lt;/managed-bean-scope&gt;
       &lt;managed-property&gt;
           &lt;property-name&gt;productType&lt;/property-name&gt;
           &lt;value&gt;#{param.productType}&lt;/value&gt;
       &lt;/managed-property&gt;
      &lt;/managed-bean&gt;
  ...
  public class MbProducts {
  ...
   public void setProductType(String productType) {
    this.productType = productType;
   }
  ...
  }
  </code></pre>
  
  <p>But neither of these ways have helped me. All of them returned null. How can i get this productType? Or how can i pass it some other way?</p>