Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

DWR Ajax remoting framework

DWR Ajax remoting framework

Direct Web Remoting (DWR) is a technology that allows Javascript running in the browser to interact with Java running on the server. The two main roles of DWR are

  • Allow Javascript running in the browser to remotely invoke Java object methods on the server.
  • Convert objects between Java and Javascript and pass them between the browser and the server.

This is accomplished by

  • Connecting the browser to a web application (server) to receive incoming requests.
  • Generating Javascript code in the browser that has a similar interface to the Java code being 'wrapped'.
  • Executing Javascript callback functions when asynchronous requests are processed by the server.

DWR functionality is added to an application by adding the DWR Servlet to the web.xml file. Server-side methods and objects that are available in Javascript are configured in dwr.xml. For more information on the DWR technology, see http://directwebremoting.org/dwr/index.html.