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.

3
  • So, you are using Java servlets, and you want to know how to respond to a HTTP Post Request? Commented Nov 14, 2013 at 4:10
  • Yes, that is correct. Plus I wish to understand how can I handle the parameters posted with this function. Commented Nov 14, 2013 at 5:11
  • This should help... stackoverflow.com/questions/5222/… Commented Nov 14, 2013 at 5:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.