On to Jquery Ajax call , getting the whole HTM content as response
<p>This is my Server side coding on to the JSP </p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;/head&gt;
&lt;%

int number = 10;
    out.println("The Returned response as per the hardcoded values is "+number);
%&gt;
&lt;/html&gt;
</code></pre>

<p>As you can see that , i am returrning an number as the response for an AJAX call </p>

<p>And on to the Script.js file , i am handling it in this way :</p>

<pre><code>                                 $.ajax({
        type : "post",
        url : "calculate.jsp",
       dataType: "html",
        success : function(msg) {
            var pinNumber = msg;
            alert(pinNumber);
        }
    });
</code></pre>

<p>As a result of this , i am getting the whole HTMl content as response as shown in the figure 
<a href="http://tinypic.com/view.php?pic=vy431w&amp;s=5" rel="nofollow">http://tinypic.com/view.php?pic=vy431w&amp;s=5</a></p>
