title: print return value from ajax call
body: <p>I have below ajax code which i want to print value on html page.</p>
  
  <pre><code>var val = $.ajax({
                type: "post",
                url: "count.jsp",
                data: "",
                cache: false,
                success: function(str)
                {
                  return str;
                }
           });
  
           alert (val);
  </code></pre>
  
  <p>I want to use the val to print. <code>count.jsp</code> code is below.</p>
  
  <pre><code>ResultSet rs=pst.executeQuery();
  if(rs.next())
  {
      val=rs.getInt(1);
  }
  out.println(val);
  </code></pre>
  
  <p>Any advice how to print val on page?</p>