title: Struts2 + Rest Plugin: strange behavior when setting properties in action class
body: <p>I'm facing a strange behavior with struts2 using the rest plugin. Strange because in the Web Application I've already done, everything is working fine.</p>
  
  <p>Well, I have a popup jsp with a post form. This form action url calls correctly the create method of a controller.</p>
  
  <pre><code>&lt;form name="gestioneUtenteForm" action="../credenziali" method="post"&gt;
             &lt;input type="hidden" name="idModifica" id="idUtente" value="&lt;%=request.getParameter("idModifica") %&gt;" /&gt;
              &lt;div&gt;
                  &lt;label&gt;Nome Completo&lt;/label&gt;
                  &lt;input type="text" name="nomeUtente" id="nomeUtente" /&gt;
              &lt;/div&gt;
              &lt;div&gt;
                  &lt;label&gt;Login&lt;/label&gt;
                  &lt;input type="text" name="loginUtente" id="loginUtente" /&gt;
              &lt;/div&gt;
              &lt;div&gt;
                  &lt;label&gt;Password&lt;/label&gt;
                  &lt;input type="password" name="password" id="password" /&gt;
              &lt;/div&gt;
              &lt;div&gt;
                  &lt;label&gt;Conferma Password&lt;/label&gt;
                  &lt;input type="password" name="confermaPassword" id="confermaPassword" /&gt;
              &lt;/div&gt;
              &lt;!-- ... OTHER FIELDS ... --&gt;
  
          &lt;div&gt;&lt;input type="submit" name="submit" value="Registra" /&gt;&lt;/div&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>My problem is that not all property values of the controller are being setted from post's parameters. I mean, with firebug I see that all parameters are being posted and if I get them in the controller with calls like request.getParameter("something"), I'm getting all the values. If I try to get parameters from controller's properties with their getters, I get something correctly but something else with null values. In the specific:</p>
  
  <pre><code>private String nomeUtente;
  private String loginUtente;
  private String password;
  ... Other Properties ....
  
  
  public String getNomeUtente() {
      return nomeUtente;
  }
  
  public void setNomeUtente(String nomeUtente) {
      this.nomeUtente = nomeUtente;
  }
  
  public String getLoginUtente() {
      return loginUtente;
  }
  
  public void setLoginUtente(String loginUtente) {
      this.loginUtente = loginUtente;
  }
  
  public String getPassword() {
      return password;
  }
  
  public void setPassword(String password) {
      this.password = password;
  }
  
  ... Other Setters &amp; Getters ...
  
  
  
  public HttpHeaders create() {
      GestioneUtenteService.creaUtente(nomeUtente, loginUtente, password,
              mailUtente, telUtente, scadenzaReg, scadenzaPwd, ruoloUtente);
  
      if (Integer.valueOf(ruoloUtente) == Constants.NUM_RUOLO_ADMIN_GENERALE)
          return new DefaultHttpHeaders("accesso").disableCaching();
  
      return index();
  }
  </code></pre>
  
  <p>I have that loginUtente has correct values, like other properties. BUT... nomeUtente and password are null. While if I call:</p>
  
  <pre><code>public HttpHeaders create() {
  
      HttpServletRequest request = getServletRequest();
      nomeUtente = request.getParameter("nomeUtente");
      loginUtente = request.getParameter("loginUtente");
      password = request.getParameter("password");
      mailUtente = request.getParameter("mailUtente");
      telUtente = request.getParameter("telUtente");
      scadenzaReg = request.getParameter("scadenzaReg");
      scadenzaPwd = request.getParameter("scadenzaPwd");
      ruoloUtente = request.getParameter("ruoloUtente");
  
      logger.info("Creazione utente");
      GestioneUtenteService.creaUtente(nomeUtente, loginUtente, password,
              mailUtente, telUtente, scadenzaReg, scadenzaPwd, ruoloUtente);
  
      if (Integer.valueOf(ruoloUtente) == Constants.NUM_RUOLO_ADMIN_GENERALE)
          return new DefaultHttpHeaders("accesso").disableCaching();
  
      return index();
  }
  </code></pre>
  
  <p>as I said before, I'm getting all values...nomeUtente and password included, because everything is being posted.
  Again with the Web Application everything is working and the controller's properties are all correctly setted.</p>
  
  <p>Where's the problem?</p>