title: Ajax Get in jQuery not working in spring mvc
body: <p>I have a problem with Ajax not  get request not working in my spring mvc application. Here I have to load form elements dynamically using Ajax way on click of a button. My code goes as below.</p>
  
  <p>ResourcePipeline.jsp:</p>
  
  <pre><code>&lt;head&gt;
    $(document).ready(function() {
      var resourcePosition = 0;
      $('#addResourceButton').click(function() {
        resourcePosition++;
        alert(resourcePosition);
        $.get("appendResourceView.page", { fieldId: resourcePosition}, function(data){
          $('#submitRow').before(data);
          alert(resourcePosition+ "after sending the url");
        });
      });
    });
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;input type="button" id="addResourceButton" value="+" /&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>my controller:</p>
  
  <pre><code>@RequestMapping(method = RequestMethod.GET, value="/appendResourceView.page")
      protected String appendResourceField(@RequestParam Integer fieldId, ModelMap model)
      {   
          System.out.println(fieldId + "from ajax call");
          model.addAttribute("resourceNumber", fieldId);
          return "resourceInsert.view";
      }
  </code></pre>
  
  <p>I think the jQuery Ajax call is not reaching my controller. But I am not sure. The first alert box in my jQuery snippet is working fine. But my second alert inside function(data) is not getting fired. Also <code>system.out.println</code> in my controller is also not getting printed. But when I enter the url manually like </p>
  
  <pre><code>&gt; http://localhost:8080/das/appendResourceView.page.
  </code></pre>
  
  <p>apache is throwing some error like "The request sent by the client was syntactically incorrect". Need help. Thanks in advance.</p>