Archive for the tag 'Ajax'

Apr 09 2008

Create reverse Ajax Web-Applications with DWR and NetBeans



This blog was submitted to the NetBeans IDE 6.1 Beta Blogging Contest.

In this blog you can read how to create a (very simple) reverse Ajax Web-Application, using NetBeans 6.1 BETA and running on GlassFish v2 (YES – i like new technologies!). This example is also working with previous NetBeans versions and Apache Tomcat 6.

Note:
Download-links to all files are available at the end of this blog-entry.


Prerequisites

To work with this example you need an installed NetBeans 6.1 BETA (as above mentioned, older versions are working too) with included GlassFish v2 and the DWR-Jar’s (included in the Example-archive). If you don’t want to create this example from scratch, you can open it with NetBeans and run it immediately. You can read in my other blog how to open an existing NetBeans project.


Introduction

There are many reverse Ajax Frameworks like COMETd and Pushlets which have the ability to push data from the Web Server to the Client (Browser). This effect is similar to applications using traditional Ajax with polling to detect new information on the server.

DWR, or Direct Web Remoting, is a Java open source library which helps developers write web sites that include Ajax technology. It allows code in a web browser to use Java functions running on a web server as if those functions were within the browser.

Direct Web Remoting diagram


DWR consists of two main parts:

Technorati Tags: Ajax, dwr, GlassFish, Java, NetBeans

20 responses so far