A chat sample using Spring MVC 3.2, Servlet-based, async request processing.
There is a bug that affects Tomcat 7.0.29 (see Bug 53623. To use Tomcat to run the sample you will need Tomcat 7.0.30 or a nightly 7.0.x snapshot (not yet available at the time of writing).
To start the sample run mvn tomcat7:run
and then access it at http://localhost:8080/spring-mvc-chat.
Eclipse users run mvn eclipse:eclipse
and then import the project. Or just import the code as a Maven project into IntelliJ, NetBeans, or Eclipse.
Also see the redis branch for a distributed chat with persistence and pub-sub notifications via Redis instance.