Question: how ajax works in java?
Answer: Ajax works by employing an XMLHttpRequest object to pass requests and responses asynchronously between the client and server. ... The XMLHttpRequest object then makes an asynchronous request to the web server. On the web server, an object such as a servlet or listener handles the request.