0

I am sorry, I know the question is pretty stupid, but I am pretty new at Java, I've been working a lot with .NET. With .NET I was using the following function to gather data and receive response from another page:

$.ajaxSetup({
    global: false,
    timeout: 60000,
    type: "POST"
});

$.getJSON("Async/GetRegionalData",
{
    requestedFunction: "getData",
    id: 1
},
function (data) {
    if (data != null) {
        if (!data.ErrorCode == "0") {

        }
        else {
             //function goes here
            }
        }
    }
});

My question is this: How can I achieve the same thing with Java file as a server side? Any links to relative topics would be of help. How to get the parameters in the url that is requested? Anything connected with this topic is helpful. I did some research, but I didn't find much regarding this topic. Thank you in advance.

user2227904
  • 679
  • 1
  • 8
  • 27
  • So, you are using Java servlets, and you want to know how to respond to a HTTP Post Request? – James Nov 14 '13 at 04:10
  • Yes, that is correct. Plus I wish to understand how can I handle the parameters posted with this function. – user2227904 Nov 14 '13 at 05:11
  • This should help... http://stackoverflow.com/questions/5222/accessing-post-variables-using-java-servlets – James Nov 14 '13 at 05:52

0 Answers0