DIRECT WEB REMOTING
Direct Web Remoting (http://getahead.org/dwr/) is a true proxy framework for web
applications written in Java. DWR allows a developer to write his or her web application in
Chapter 7: AJAX Framework Exposures 179
Java, and then use DWR dynamically to generate corresponding JavaScript. The generated
JavaScript can then be sent down to clients, where it can be used to call methods in the Java
web application. When a method is called, the data is sent to the DWR servlet on the
application server. The DWR servlet acts to marshal the data back and forth between the
JavaScript in the client and the Java methods in the web application.
Installation Procedures
The following steps are taken by the developer to install DWR:
1. First, ensure you have a correctly functioning Java Servlet container such as
Apache Tomcat or IBM WebSphere.
2. Download the latest version of DWR from http://getahead.org/dwr/
download. Once downloaded, the dwr.jar ?¬? le should be moved to the WEBINF/
lib directory of the web application.
3. Edit con?¬? guration ?¬? les to add DWR functionality. First, the WEB-INF/web.xml
file should be edited to add new
and
sections for DWR, as described at http://getahead.
Pages:
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323