title: Spring Form hidden value is lost on submit
body: <p>On my 'update user' page I have a hidden field to hold the ID of the current user being edited. I've checked the HTML source and the value populates correctly. However when I submit the form, the userID value ALWAYS comes through as 0 while every other field comes through correctly.</p>
  
  <p>-I've tried setting the type as form:input and submitting it, still 0 on the controller side.<br/>
  -There are no bindingresult errors.<br/>
  -Page URL: /admin/update-user.html?uid=3 (I've tried changing the URL variable from uid to userID, no difference.)</p>
  
  <p>So what the heck is going on?! Am I missing something obvious??</p>
  
  <p><strong>JSTL</strong></p>
  
  <pre><code>&lt;form:form commandName="user" method="POST"&gt;
  &lt;form:hidden path="userID"/&gt;
  &lt;table width="400" cellpadding="3" cellspacing="0" border="0" class="datatable"&gt;
      &lt;tr&gt;
          &lt;td&gt;User ID #&lt;/td&gt;
          &lt;td&gt;${user.userID}&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td valign="top"&gt;Password&lt;/td&gt;
          &lt;td&gt;****&lt;br /&gt;&lt;a href="change-password.html?uid=${user.userID}"&gt;Change Password&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;First Name&lt;/td&gt;
          &lt;td&gt;&lt;form:input path="firstName" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Last Name&lt;/td&gt;
          &lt;td&gt;&lt;form:input path="lastName" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Gender: &lt;/td&gt;
          &lt;td&gt;
              &lt;form:select path="gender"&gt;
                  &lt;form:option value="Male" label="Male" /&gt;
                  &lt;form:option value="Female" label="Female" /&gt;
              &lt;/form:select&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Birthday: &lt;/td&gt;
          &lt;td&gt;&lt;form:input path="birthday" id="datepickerpast" readonly="true" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Email&lt;/td&gt;
          &lt;td&gt;&lt;form:input path="email" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&amp;nbsp;&lt;/td&gt;
          &lt;td&gt;&lt;input type="submit" value="Update" /&gt; &lt;input type="reset"&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/form:form&gt;
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>@RequestMapping(value = "admin/update-user", method = RequestMethod.POST)
  public String processUpdateUser(ModelMap model, @ModelAttribute("user") User user, BindingResult result) throws SQLException {
      if (result.hasErrors()) {
          model.addAttribute("user", user);
          model.addAttribute("pagetitle", "Admin - Update User Details");
          return "admin/users/update-user";
      } else {
          userDao.updateUser(user);
          return "redirect:/admin/user-management.html";
      }
  }
  </code></pre>
  
  <p><strong>Object Properties with appropriate getters/setters</strong></p>
  
  <pre><code>private int userID;
  private String firstName;
  private String lastName;
  private String username;
  private String email;
  private Date birthday;
  private String gender;
  </code></pre>