This page describes how to integrate [http://incubator.apache.org/xap Apache XAP] with [http://struts.apache.org Struts2]. I use the Person Manager struts sample to illustrate how to upgrade an html application to use XAP. Overall the integration is quite simple. I was able to repurpose all of the Java code (Data Model, ActionHandlers) from the sample. All that needed to be done was to re-write the *.ftl files to output a combination of <strong>xModify</strong> and <strong>XAL</strong> instead of html.
The reason why integration with web frameworks is so easy, is that the XAP client retrieves the markup used to describe the application from the server and then renders it entirely on the client. This is the opposite of other Ajax toolkits where: