In short, the options are:
- Do it yourself, when you need fine-grained control over your web application’s AJAX functionality.
- Use a client-server framework (e.g. Ajax4jsf), when you want to take advantage of tools such as the Sun Java Studio Creator IDE to build web applications by dragging and dropping components, or if you’re already using JavaServer Faces technology to build web applications.
- Go remote (e.g. with Direct Web Remoting), when you have business logic in server-side Java objects that you want to use to process AJAX requests.
- Go all Java technology (e.g. Google Web Toolkit), when you want to develop AJAX-enabled applications using the Java programming language exclusively.