title: JSON Jquery to Struts2 action
body: <p>I want to send my JSON object from Javscript to Struts2 Action.</p>
  
  <p>Sample JSON Object</p>
  
  <pre><code>  {
          "lists":["list1","list2","list3","list4","list5"],
          "maps": {  
              "key4":"value4","key3":"value3","key5":"value5","key2":"value2","key1":"value1"
          },
          "number1":123456789,
          "numberarray1":[1,2,3,4,5,6,7,8,9],
          "string1":"A",
          "stringarray1":["A1","B1"]
      }
  </code></pre>
  
  <p>My Jquery Ajax</p>
  
  <pre><code>$.ajax({
      type: 'POST', 
      url: 'json/JSON.action',
      data: JSON.stringify(data),
      dataType: 'json',
      async: false ,
      contentType: 'application/json; charset=utf-8',
      success: function(){window.alert('Done');}
  });
  </code></pre>
  
  <p>Struts.xml config</p>
  
  <pre><code>&lt;action name="JSON" class="com.actions.json.JsonAction" method="getJSON"&gt;
      &lt;result type="json"/&gt;
  &lt;/action&gt;   
  </code></pre>
  
  <p>My Action Class</p>
  
  <pre><code>public class JsonAction extends ActionSupport {
  
  
      private String data;
  
  
      public String getJSON() {
  
  
          return ActionSupport.SUCCESS;
      }
  
      public String getData() {
          return data;
      }
  
      public void setData(String data) {
          this.data = data;
      }
  
  
  
  }
  </code></pre>
  
  <p>My Problem is how to receive the JSON Object in Action Class.</p>
  
  <p>NOTE: POST OF JSON object is successful.. I just don't know how to receive it via Action Class.. PLEASE HELP
  Thank you</p>