title: Ajax Success data returns complete HTML page
body: <p>I'm using <code>iFrame</code> class JSP page with Date picker field on it. On selecting a date from the picker, I'm sending the date to the Struts Action using jQuery AJAX call like below: </p>
  
  <pre><code>$( "#datepickerStart" ).datepicker({
    onSelect: function(dateText, instance) {//date select from picker to trigger
    $.ajax({
      type: "Post",// post method
      url: 'checkAvailability.do?operation=getlist&amp;datepickerStart='+ ("#datepickerStart").val(), // passing URL with date value to STRUTS Action
      data: "date="+date,
      //dataType: "application/json",
      success: function(data) {
        alert(data); //getting with the complete HTML page
      }
    }); 
   }
  });
  </code></pre>
  
  <p>And from DB I'm fetching the results in LIST and converting to JSON object like below:</p>
  
  <pre><code>Gson gson = new Gson();// Using google GSON to convert to JSON
  String json = new Gson().toJson(lRList);
  response.setContentType("application/json");// setting content type
  response.setCharacterEncoding("UTF-8"); //setting character encoder
  response.getWriter().write(json);// writing to response the JSON object
  System.out.println("JSON Object::"+json);
  </code></pre>
  
  <p>And in standard output gives me the result like this:</p>
  
  <pre><code>JSON Object::[{"bookDate":"2014-07-11","fromTime":"2:00PM","totime":"3:30PM","userID":"XXX","isSuccess":false},
  {"bookDate":"2014-07-11","fromTime":"10:30AM","totime":"11:00AM","userID":"XXX","isSuccess":false}]
  </code></pre>
  
  <p>But the alert in Ajax success gives the complete HTML page :(. I need this data and want to populate the values in the same JSP by showing in a div table. So can anyone help me on this to resolve it and let me know where I'm doing the mistake...</p>