title: Getting query-string parameters in managed beans
body: <p>I've got trouble with getting URL param in JSF / PrimeFaces.</p>
  
  <p>That works fine for all my pages, except for one where I cant get URL param</p>
  
  <p>My URL is like this </p>
  
  <pre><code>/path/to/my/page?id=99
  </code></pre>
  
  <p>My bean class is annoted with</p>
  
  <pre><code>@Named
  @ViewRequest
  </code></pre>
  
  <p>I do it this way in the <code>@PostConstruct</code> method</p>
  
  <pre><code>Map&lt;String, String&gt; params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
  String id = params.get("id");
  </code></pre>
  
  <p>but params do not contain <code>id</code></p>
  
  <p>Instead of having URL param names in the params Map, I have other values like these</p>
  
  <pre><code>[0]javax.faces.partial.render=...
  [1]javax.faces.partial.execute=...
  [2]j_idt20=...
  [3]javax.faces.ViewState=...
  </code></pre>
  
  <p>Does someone have an idea about this problem?</p>
  
  <p>Thanks</p>