title: How to get object from http request in servlet?
body: <p>I use jquery to send a json object servlet</p>
  
  <p>It send the following data in the request</p>
  
  <hr>
  
  <p>Form Dataview URL encoded
  stringArray[]:s1</p>
  
  <p>stringArray[]:s2</p>
  
  <p>stringArray[]:s3</p>
  
  <p>objectArray[0][key1]:val1</p>
  
  <p>objectArray[0][att1]:att val1</p>
  
  <p>objectArray[1][key2]:val2</p>
  
  <p>objectArray[1][att2]:att val2</p>
  
  <p>objectArray[2][key3]:val3</p>
  
  <p>objectArray[2][att3]:att val3</p>
  
  <hr>
  
  <p>for the string array, I can use request.getParameterValues["stringArray"]</p>
  
  <p>but the object array is cannot. How I can get the json array in the servlet?</p>
  
  <pre><code>var json={"stringArray":["s1", "s2", "s3"],
              "objectArray":[{"key1":"val1", "att1":"att val1"},
                              {"key2":"val2", "att2":"att val2"},
                              {"key3":"val3", "att3":"att val3"}]
          };
  $.ajax
  (
      {
          url:'../test',
          data:json,
          type:'post',
          cache:false,
          dataType:'json',
          success:function(data)
                  {
  
                  },
          error:function(){alert('error');}
      }
  );
  </code></pre>