I’ve a Java EE servlet to which I’m submitting some information in JSON format. Below is the JS code that I’m using to submit the information.
var params = {"key1":"value1","key2":"value2"};
var xhrArgs = {
url: "http://localhost:8080/servlet/testapp",
postData: dojo.toJson(params),
handleAs: "json",
load: function(data) {
//Handle load
},
error: function(error) {
//handle error
}
};
var deferred = dojo.rawXhrPost(xhrArgs);
Now how do I retrieve the post data at the server end? When i try
request.getParameter("params"), I should get the JSON data.
Could you please let me know how I can implement this?
I should be using
to retrieve the information the server side.