Skip to content

Latest commit

 

History

History
70 lines (58 loc) · 2.88 KB

README.md

File metadata and controls

70 lines (58 loc) · 2.88 KB

tapestry-atmosphere

Asynchronous WebSocket/Comet Support in Tapestry using Atmosphere

The aim of this project is to support push applications in Apache Tapestry without requiring developers to write a single line of javascript or concern themselves with the underlying Atmosphere implementation.

See a live demo running here

Wiki Topics

Maven

<dependencies>
   <dependency>
      <groupId>org.lazan</groupId>
      <artifactId>tapestry-atmosphere</artifactId>
      <!--  lookup latest version at https://github.com/uklance/releases/tree/master/org/lazan/tapestry-atmosphere -->
      <version>x.y.z</version> 
   </dependency>
</dependencies>
<repositories>
   <repository>
      <id>lazan-releases</id>
      <url>https://raw.github.com/uklance/releases/master</url>
   </repository>
</repositories>

See the quick dependency reference to see which atmosphere jars are required for your web container.

web.xml

The AtmosphereServlet is running inside the TapestryFilter so there is no need to configure the AtmosphereServlet in web.xml. You must set the async-supported element to true to allow async communication.

eg:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
      "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
	<context-param>
		<param-name>tapestry.app-package</param-name>
		<param-value>my.app.package</param-value>
	</context-param>
	<filter>
		<filter-name>app</filter-name>
		<filter-class>org.apache.tapestry5.TapestryFilter</filter-class>
		<async-supported>true</async-supported>
	</filter>
	<filter-mapping>
		<filter-name>app</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
</web-app>