title: How to call @RequestMapping method of Controller having specified URL using AJAX
body: <p>I'm very new to Spring and Portlet. I want to use jqgrid to show some list. I am trying to call a method in controller which is annoted with  the @RequestMapping but the method is not being called </p>
  
  <p>My Controller has following method</p>
  
  <pre><code>@Controller(value = "myController")
  public class MyController {
      @RequestMapping(value="/myURL",method=RequestMethod.GET)
      public @ResponseBody MyDTO  initItemSearchGrid(RenderResponse response, RenderRequest request){
          MyDTO myDto=new MyDTO();
          return myDto;
      }
  }
  </code></pre>
  
  <p>My JSP code using AJAX</p>
  
  <pre><code>var urlink="/myURL"; /* myURL is the exact String written in value Attribute of
                                resourceMapping in Controller*/
  $.ajax({
      url :urlink,
      cache: false,
      data:$('#myForm').formSerialize(),
      dataType: "json",
      type: "GET",
      contentType: "application/json; charset=utf-8",
      success: function(jsondata){
         ...
      }
  });
  </code></pre>
  
  <p>When above AJAX code is executing my method is not called.</p>