title: spring mvc list<Long> as parameter in controller method
body: <p>I need same help with same issue i have. I need to pass a list of long object as parameters in a controller method, that is call via jquery.</p>
  
  <p>here is the code</p>
  
  <pre><code>@RequestMapping(value="/path/retrieve")
      public @ResponseBody String retrieve(@RequestParam List&lt;Long&gt; ids) {
          *******
      }
  </code></pre>
  
  <p>and the jquery call</p>
  
  <pre><code>var aids = new Array();
  aids.push(busId);
  ajaxCall('path/retrieve.html', {
                  ids : aids
              }, function() { // more code **********
  });
  </code></pre>
  
  <p>the ajaxCall it is a function with this code:</p>
  
  <pre><code>function ajaxCall(url, data, callback, onError) {
  
      jQuery.ajax({
          type : 'POST',
          url : url,
          dataType : 'json',
          data : data,
          success : function(actionResult) {
              actionResult = eval(actionResult);
              // these kind of calls must return an action result.
              if (callback != undefined || callback != null)
                  callback(actionResult); // invoke callback passing object result
          },
          error : function(jqXHR, textStatus, errorThrown) {
              if (onError != undefined &amp;&amp; onError != null)
                  onError(jqXHR, textStatus, errorThrown);
              else
                  ajaxCallOnError(jqXHR, textStatus, errorThrown);
          }
      });
  }
  </code></pre>
  
  <p>well, when i trying to make the call i get the following error</p>
  
  <p>HTTP 400 - The request sent by the client was syntactically incorrect ()</p>
  
  <p>i assume that the controller does not accept a List as parameter, how can i solved this problem?</p>