title: Basic Spring MVC Data Binding
body: <p>I'm learning Spring MVC and I've looked everywhere to do just a basic controller to view data binding but nothing I've tried as work. I can bind view posting back to controller and I can see the pojo with properties there, however whenever I tried to add that object to the model I get nothing. Here is what I have so far:</p>
  
  <p>Controller</p>
  
  <pre><code>@Controller
  public class HomeController {
  
      @RequestMapping(value = "/", method = RequestMethod.GET)
      public String home(Model model) {
  
          model.addAttribute(new Person());
          return "home";
      }
  
      @RequestMapping(value="/about", method=RequestMethod.POST)
      public void about(Person person, Model model)
      {
          model.addAttribute("person", person);
      }   
   }
  </code></pre>
  
  <p>Class I want to bind</p>
  
  <pre><code>public class Person {
  private String _firstName;
  private String _lastName;
  private Date _Birthday;
  
  //Set
  public void setFirstName(String FirstName){this._firstName = FirstName; }
  public void setLastName(String LastName){this._lastName= LastName; }
  public void setBirthDate(Date BirthDate){ this._Birthday = BirthDate;}
  
  //get
  public String getFirstName(){return _firstName;}
  public String getLastName(){return _lastName;}
  public Date getBirthDate(){return _Birthday;}
  }
  </code></pre>
  
  <p>View - Controller-to-Form ! Working</p>
  
  <pre><code>&lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /&gt;
  &lt;html&gt;
  &lt;/head&gt;
      &lt;body&gt;
          FirstName: ${model.person.getFirstName}
          LastName: ${model.person.getLastName}
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>What can I or need this to do get it to bind?</p>