title: jQuery Ajax POST request not hitting Spring controller
body: <p>I am unable to hit my spring controller using jQUERY AJAX POST.
  I am trying to fetch a list of string using JSON response.</p>
  
  <p>My javascript function which is called when a dropdown is selected:</p>
  
  <pre><code>function doAjaxPost() {  
  
    var name = $('#selected_report').val();
  
    alert("POST Ajax request initiating.... name : " + name);
  
    $.ajax({  
      type: "POST",  
      url: "/NewILR/interfaceReportsSearch/findEntityTypes", 
      contentType: "application/json",
      data: JSON.stringify({selectedReport:name}),  
      dataType: "text",
      success: function(response){
        if(response.status == "SUCCESS"){
            alert("SUCCESS");
        }else{
              alert("FAILURE");
        }       
      },  
      error: function(e){  
        alert('Error: ' + e);  
      }  
    });  
  } 
  </code></pre>
  
  <p><strong>NOTE</strong> Two of the above alerts are displayed (POST Ajax request initiating... and 'Error: ' + e))</p>
  
  <p>Spring Controller to handle the AJAX request: </p>
  
  <pre><code>@RequestMapping (value="/interfaceReportsSearch/findEntityTypes",method=RequestMethod.POST, produces = "application/json")
      public @ResponseBody JsonResponse addUser(@RequestBody String selectedReport , BindingResult result ){
  
      System.out.println("Ajax Request Received! reportName = " + selectedReport);
  </code></pre>
  
  <p><strong>NOTE</strong> the above print statement is never executed.
  I also do not see a single console output, maybe the request does not get to the server.</p>
  
  <p>No special beans are added to the servlet condiguration but I have the below two added:    </p>
  
  <pre><code>&lt;mvc:annotation-driven /&gt;
  &lt;context:annotation-config/&gt; 
  </code></pre>
  
  <p>Following jars are added to my classpath.</p>
  
  <pre><code>jackson-core-2.2.0
  jackson-annotations-2.2.0
  jackson-databind-2.2.0
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Solved: changed the datatype to json</p>