title: How to submit spring form in ajax(jquery) with modelAttribute
body: <p>I am new to Spring MVC.
  I have a form like this,</p>
  
  <p><code>&lt;form:form action="/myaction.htm" method="post" modelAttribute="myForm" id="formid"&gt;</code> and a controller that returns json</p>
  
  <p><code>public @ResponseBody ResultObject doPost(@ModelAttribute("myForm") MyForm myForm){
  System.out.println("myform.input");
  }</code></p>
  
  <p>I am able to submit this using<code>$("#formid").submit();</code> and my modelAttribute is working fine, taking values from UI.</p>
  
  <p>my question is, how to submit this form in jquery ajax way?
  I tried this,</p>
  
  <pre><code>$.ajax({
  type:"post",
  url:"/myaction.htm",
  async: false,
  dataType: "json",
  success: function(){
  alert("success");
  }
  
  });
  </code></pre>
  
  <p>the form is submitted but modelAttribute values are nulls, how to include modelAttribute object(object that form is using) while submitting?</p>