title: Loading a popup using ajax
body: <p>I have a jsp page which should load a popup using ajax. The content of the page is determined by form filled by user.</p>
  
  <p>Something like this:</p>
  
  <p>javascript:</p>
  
  <pre><code>ajax('getPage.action', 'content_id', 'form_id');
  </code></pre>
  
  <p>foo.jsp:</p>
  
  <pre><code>&lt;div id="content_id"&gt;&lt;/div&gt;
  
  &lt;form id="form_id"&gt;
   ...
  &lt;/form&gt;
  </code></pre>
  
  <p>java/spring:</p>
  
  <pre><code>@RequestMapping("getPage.action")
  MyController extends AbstractCommandController {
    RealDto dto = (RealDto)command;
    ...
    return new ModelAndView("foo", data);
  }
  </code></pre>
  
  <p>The most difficult part for me is how to send the form data easily as an ajax call. Can I use jQuery here? The form changes dynamically so it would be quite bothersome to list all the fields of the form.</p>
  
  <p>Would it help to use Springs XT (which I never have)?</p>