title: Ajax call in Java client application
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4112686/how-to-use-servlets-and-ajax">How to use Servlets and Ajax?</a>  </p>
  </blockquote>
  
  
  
  <p>I am using the following code in Javascript to makes an Ajax call:</p>
  
  <pre><code>function getPersonDataFromServer() {
          $.ajax({
              type: "POST",
              timeout: 30000,
              url: "SearchPerson.aspx/PersonSearch",
              data: "{ 'fNamn' : '" + stringData + "'}",
              contentType: "application/json; charset=utf-8",
              dataType: "json",
              success: function (msg) {
                  ...
              }
          });
      }
  </code></pre>
  
  <p>I would like to do this in Java as well. Basically, I would like to write a Java client application which send this data via Ajax calls to the server. </p>
  
  <p>How do I do Ajax in Java?</p>