title: Retaining GET request query string parameters on JSF form submit
body: <p>I have 3 pages:</p>
  
  <ul>
  <li><code>main.xhtml</code></li>
  <li><code>agreement.xhtml</code></li>
  <li><code>generated.xhtml</code></li>
  </ul>
  
  <p>The <code>agreement.xhtml</code> needs two parameters to load correctly: <code>serviceId</code> and <code>site</code>. So, a normal url looks like this: <code>/app/agreement.xhtml?site=US&amp;serviceId=AABBCC</code>. </p>
  
  <p>I have this button on <code>agreement.xhtml</code></p>
  
  <pre><code>&lt;h:form&gt;
     &lt;h:commandButton value="Generate License File" action="#{agreement.generateMethod}" /&gt;   
  &lt;/h:form&gt;
  </code></pre>
  
  <p>The <code>@RequestScoped</code> bean <code>#{agreement}</code> has this method:</p>
  
  <pre><code>public String generateMethod(){
      .......
      return "generated";
  }
  </code></pre>
  
  <p>I need that, on click, the <code>generateMethod()</code> method is executed, and after it's done, the user is redirected to the <code>generated.xhtml</code> page. What's happening is that, on click, the page browser sends the user to <code>/app/agreement.xhtml</code> and, since it's not sending the parameters <code>site</code> and <code>serviceId</code>, it crashes.</p>
  
  <p>I tried making the <code>generateMethod()</code> return a <code>"generated?faces-redirect=true"</code>, but still nothing. Any ideas?</p>