Ajax with Servlet.3- Implementing AJAX with Servlet using POST request

preview_player
Показать описание
In this tutorial we will see how to implement AJAX in Java with the help of servlets. We will be using POST HTTP method to sent the request and get back the response in TEXT format.

We will also see how to send data from jsp to servlet from ajax both from GET as query parameter and from POST as non-query parameter.
We will also see hoe readyState changes as the request flows.
So we basically will create a:
-servlet
-jsp
-ajax java script function
and combine these three.

Here we will learn what is AJAX and what is XMLHttpRequest object and what are its features.

I will brief about why XMLHttpRequest or XHR is so important and we can use to make independent calls to Servlets to get a real time response.

We will see the methods XMLHttpRequest has like open() and send(). We will also see at the properties of XMLHttpRequest like status, onreadystatechange and readystate etc.
Рекомендации по теме
welcome to shbcf.ru