title: GET request parameter not available by ExternalContext#getRequestParameterMap()
body: <p>What I am trying to do is to be able to pass a parameter through an URL and execute certain actions if this parameter is being passed or not. I am using JSF + Richfaces.</p>
  
  <p>For example if I try to access http:// localhost/myapp/home.jsf</p>
  
  <pre><code>public class My Bean {
  
  private boolean printHello = false;
  
  public MyBean(){
    FacesContext fc = FacesContext.getCurrentInstance();
    String printHello = fc.getExternalContext().getRequestParameterMap().get("printHello");
    if (printHello != null &amp;&amp; printHello.equals("true")
      printHello = true;
  }
  
  public void myFunction() {
    if (printHello)
      System.out.println("test");
      //other stuff
      //ask for some user input
  }
  
  //When user validate his input, this function is called
  public void myFunction2() {
    //some stuff
  }
  </code></pre>
  
  <p>}</p>
  
  <p>When I am asking for the user input in myFunction(), I also have a link on my page to start over the all process. If after clicking that link, and then manually change the url to http:// localhost/myapp/home.jsf?printHello=true</p>
  
  <p>The bean won't be cleared and my printHello flag will still be set to false.</p>
  
  <p>Also, when the following will be executed again:</p>
  
  <pre><code>FacesContext fc = FacesContext.getCurrentInstance();
  String printHello = fc.getExternalContext().getRequestParameterMap().get("printHello");
  </code></pre>
  
  <p>printHello will be null, thats what I dont get. Maybe its due to the fact that not the all page is re-rendered?</p>