Direct Web Remoting (http://www.directwebremoting.org), is an Open Source Java framework, licensed under commercial-friendly Apache Software License v2 (http://www.apache.org/licenses/LICENSE-2.0.html) for building AJAX applications. DWR's main idea is to hide AJAX implementation details such as
XMLHttpRequest from developers. Developers can concentrate on developing the application and business objects and leave AJAX details behind the scenes where they belong.
The following figure displays the positioning of DWR in user applications and is taken from the DWR website (http://directwebremoting.org/dwr/overview/dwr).
The DWR servlet receives a request and, based on configuration, the servlet instantiates a Java object such as AjaxService, and calls the required method, for example, AjaxService.getOptions(populateList).
The callback function (written by the developer) does the desired thing with the return value such as updating the browser page and adding new options to the drop-down field.