In this section, we will introduce about the Ajax and use of Ajax in struts.

Introduction to Ajax.

Ajax : Asynchronous JavaScript and XML

Ajax is not a technology, It is a collection of technologies. It is used for
creation a fast and dynamic web pages.

Before the Ajax, for accessing any data from the server side, it compulsory
to reload whole page on client side. Ex, if the user submits a form with information, it takes
more time to validate and returns
response to the client. With the help of Ajax, you can update a part of web
page, instead of reloading whole page.

Struts2 use a toolkit called Dojo. It provides Ajax support. Ajax allows the developers to develop GUI like web applications.

struts2-dojo-plugin-2.2.1.1.jar

Note: If a client send a Ajax request, the server does not know it is
script request, it woks another request.

Ajax tool and technologies

Ajax is the combination of different technologies, which works together.
These technologies are tools are as follows..