Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying DWR Java AJAX Applications
  • Table Of Contents Toc
DWR Java AJAX Applications

DWR Java AJAX Applications

By : Sami Salkosuo
5 (2)
close
close
DWR Java AJAX Applications

DWR Java AJAX Applications

5 (2)
By: Sami Salkosuo

Overview of this book

The initial part guides the reader through the features of DWR and how it works to make the developer ready for practical implementation. The later part contains plenty of code (with explanations) and graphical interface-driven step-by-step examples, which the reader can try out while surfing through the book to learn by doing. This book is written for competent Java developers and assumes that you are a professional rather than hobbyist. You should be familiar with the concepts of programming, Web 2.0, and AJAX.
Table of Contents (12 chapters)
close
close

Chatroom


The Chatroom sample application is a very typical multi-user chatroom. The functionalities of this sample include a list of online users, automatic refresh of chat text, and the ability to send messages to the chat room.

Some of the code here is taken directly from the previous Book Authoring sample. Only the package names have been changed while the rest of the code is basically just copy-pasted to a new class

Re-use by copy-paste is not a recommended practice, but it is done here in order to keep these samples self-contained without dependencies to other samples.

Starting the Project and Configuration

We start by creating a new project for our chat room, with the project name DWRChatRoom. We also need to add the dwr.jar file to the lib directory and enable DWR in the web.xml file. The following is the source code of the dwr.xml file.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dwr PUBLIC
"-//GetAhead Limited//DTD Direct Web Remoting 2.0//EN"
"http://getahead.org...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
DWR Java AJAX Applications
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon