Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

AJAX is a client-side, user-interface technology that depends on a server-side component to provide business and data-access logic. Struts 2 makes an excellent backend to AJAX applications, especially when an application uses both AJAX and conventional requests. The elegant and extensible Struts 2 architecture makes it easy to tailor how different types of requests are processed.

There are at least three several ways to use AJAX with Struts 2 pages.

  • Ajax Tags
  • JSP results
  • Plugins

Another approach is use plain-old Ajax widgets on the front-end, and use Struts 2 Actions as the back-end. Struts Actions can return any type of response, including JSON.

Ajax Tags

Ajax Tags are used by using the Ajax Theme with the Struts Tags. The tags are based on Dojo widgets and provide a quick and easy way to start using AJAX in your application.

...