title: How to get the data from ajax request in servlet page?
body: <p>How to get the data from ajax request in servlet page. Here I'm calling the servlet by <code>$.ajax</code>.</p>
  
  <pre><code>var dataRequestObject= {}; 
                  dataRequestObject= {Username:uname,Password:pword,Domain:domain,WindowsUser:windowsuser};
  
  var dataRequestHeader= {}; 
                  dataRequestHeader= {Username:uname,Password:pword,Domain:domain,WindowsUser:windowsuser};
  
  
      $.ajax({
              type:'POST',
              url:'http://localhost:8090/SampleServlet1/serv', //calling servlet      
              cache:false,
              header:dataRequestHeader,
              data:dataRequestObject,
              success:function(){ alert("Request Done");},
              error:function(xhr,ajaxOptions){
                  alert(xhr.status + " :: " + xhr.statusText);
                  } 
              });
  </code></pre>
  
  <p>I need those data and header in setvlet page.</p>