I like to bring under your attention DWR – Easy Ajax for Java, a Java open source library created by Getahead. “Easy” is always good (like “free” is always good). The easiness of DWR is the principle that a Javascript method calls a server-side Java method: “It allows code in a web browser to use Java functions running on a web server as if it was in the browser.” An informative picture of this archtecture on the http://smnserver:8180/chat/ and http://smnserver:8181/svn/repos/chat/trunk.