Struts and Ajax
Apress eBooks · 2006
As the granddaddy of all Java web MVC frameworks, Struts has built up a loyal following of developers and has innumerable applications built on top of it. Struts frees the developer from having to write directly to the servlet API and constantly edit the web.xml file. Struts provides built-in support for validation, internationalization, and a set of JSP custom tags that ease the burden of building rich, web-enabled Java applications. Ajax integrates very easily with Struts. An Ajax request can call any Struts action by simply sending the request to the correct URL. Once there, the Ajax request is handled the same as any other HTTP request. This, of course, means that the Ajax request has the same access to the Struts validation routines, form beans, and actions, and the benefits provided by each. Struts and Ajax work very well together, and existing Struts applications can be easily extended by adding Ajax functionality. In many cases Ajax-style interactions can be added to an existing Struts application by adding an Action that reuses existing functionality.