title: Passing an javascript array to an struts action class using ajax request in jquery
body: <p>I have an array <code>ids_arr</code> which is initialized with some values.
  I have to pass this array and retrieve it in an Action class.</p>
  
  <p>Following is My code:</p>
  
  <p>Script:</p>
  
  <pre><code>$.get('deleteProduct',
    {
  
      arr_ids_fm_ajax : ids_arr
    },
    function(jsonResponse){
      alert(jsonResponse.msg);
    }
      );
  
  }
  </code></pre>
  
  <p>Action class:</p>
  
  <pre><code>public class ProductDetails extends ActionSupport {
  
      int arr_ids_fm_ajax[];
  
      public int[] getArr_ids_fm_ajax() {
          return arr_ids_fm_ajax;
      }
  
      public void setArr_ids_fm_ajax(int[] arr_ids_fm_ajax) {
          this.arr_ids_fm_ajax = arr_ids_fm_ajax;
      }
  
      public String deleteProduct() {
          System.out.println(arr_ids_fm_ajax[0]); // here i want the values of my
          // passed array from ajax.
  
          return "success";
      }
  }
  </code></pre>
  
  <p>Error at console :</p>
  
  <pre><code>Parameter [arr_ids_fm_ajax[]] didn't match acceptedPattern pattern!
  </code></pre>
  
  <p>Please provide a solution. Thanks for the reply in advance.</p>