title: jQuery ajax call to REST service
body: <p>I'm trying to make an ajax call from jquery to a rest service. The rest service used is right from a tutorial of mkyong's blog, this one: <a href="http://www.mkyong.com/webservices/jax-rs/integrate-jackson-with-resteasy/" rel="noreferrer">http://www.mkyong.com/webservices/jax-rs/integrate-jackson-with-resteasy/</a></p>
  
  <p>The service works, but when i try to make a call from jQuery, in Firebug there is a 200 status code, but in the response section, nothing.</p>
  
  <p>Here is the html page with the ajax call:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;script type="text/javascript" src="jquery-1.6.2.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;  
  
  &lt;button id="ajax"&gt;ajax call&lt;/button&gt;
  &lt;button id="json"&gt;json&lt;/button&gt;
  
  &lt;script type="text/javascript"&gt;
      $('#json').click(function(){ 
          alert('json');
           $.getJSON("http://localhost:8080/restws/json/product/get",
           function(data) {
              alert(data);         
            });   
      });
  
      $('#ajax').click(function(){ 
          alert('ajax');
           $.ajax({ 
               type: "GET",
               dataType: "json",
               url: "http://localhost:8080/restws/json/product/get",
               success: function(data){        
                  alert(data);
               }
           });
      });
  
  &lt;/script&gt;
  
  
  
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>I can't figure it out where I went wrong, could you please tell me what i am doing wrong?</p>
  
  <p>Thanks!</p>