title: JQuery AJAX Done is not executing
body: <pre><code>$('#loginForm').submit(function(e){
  
          var $inputs = $(this).find("input");
          var serializedData = $(this).serialize();   
          $inputs.prop("disabled", true);
  
          var request = $.ajax({
              url: "myurl",
              dataType: "json",
              type: "GET",
              data: serializedData,
          });
  
          request.done(function (response, textStatus, jqXHR){
              $('#loginMessage').text('GOOD');
          });
  
          request.fail(function (jqXHR, textStatus, errorThrown){
              $('#loginMessage').text('Some error occured. Please try again');
              console.error("The following error occured: ",errorThrown,jqXHR);
          });
  
          request.always(function () {
              $inputs.prop("disabled", false);
          });
          // prevent default posting of form
          e.preventDefault();         
      });
  </code></pre>
  
  <p>I am new to jquery and in the above code .done block is not executing and firebug console display this message :-</p>
  
  <p><code>GET myurl?userID=aman&amp;password=aman</code> 200 OK 37ms   jquery....min.js (line 2)</p>
  
  <p>The following error occured: (an empty string) <code>Object { readyState=0, status=0, statusText="error"}</code></p>
  
  <p><strong>Server Side Scripting</strong></p>
  
  <pre><code>protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
          String username = request.getParameter("userID");
          String password = request.getParameter("password");
          System.out.println("GET");
          response.setContentType("application/json");
          PrintWriter out = response.getWriter();
          Gson gson = new Gson();
          if(username.equals("aman") &amp;&amp; password.equals("aman")){
              out.println(gson.toJson(new Boolean("true")));
          }else{
              out.println(gson.toJson(new Boolean("false"))); 
          }
          out.close();
      }
  </code></pre>