Skip to content

Installing AtmosphereServlet with or without native support

Jeanfrancois Arcand edited this page Sep 10, 2013 · 21 revisions

Dependencies

Starting with 2.0, the only dependency an application needs, by default:

./WEB-INF
./WEB-INF/lib
./WEB-INF/lib/atmosphere-runtime-2.0.0.jar         
./WEB-INF/lib/slf4j-api-1.6.1.jar                  

Servlet 3.0 Async API

Starting with 2.0, the Atmosphere Framework will, by default, only support the Servlet 3.0 Async API with either JSR 356 (WebSocket API) or native WebSocket support. For jsr356 support, only jsr356 + Servlet 3.0 will be supported.

Native Comet Support using Atmosphere 1.0.x

To use Native Comet/WebSocket Support like Tomcat AIO/WebSocket, Jetty Continuation/WebSocket or Grizzly Comet WebSocket, add in web.xml/application.xml

        <init-param>
            <param-name>org.atmosphere.useNative</param-name>
            <param-value>true</param-value>
        </init-param>

Native Comet Support using Atmosphere 2.0.x

Jetty 9/Tomcat8/GlassFish4 native WebSocket API or Tomcat 6/7 and JBossWeb 3.x native Comet support

For those server, you need use atmosphere-runtime-native jar file:

        <dependency>
            <groupId>org.atmosphere</groupId>
            <artifactId>atmosphere-runtime-native</artifactId>
            <version>2.0.0.x</version>
        </dependency>

and also make sure the following dependency are present. By default they are pulled from Maven, but if you build with another tool, make sure you add them:

Tomcat 7

        <dependency>
            <groupId>org.atmosphere</groupId>
            <artifactId>atmosphere-compat-jbossweb</artifactId>
            <version>1.0.15</version>
        </dependency>
        <dependency>
            <groupId>org.atmosphere</groupId>
            <artifactId>atmosphere-compat-tomcat</artifactId>
            <version>1.0.15</version>
        </dependency>

Tomcat 6

        <dependency>
            <groupId>org.atmosphere</groupId>
            <artifactId>atmosphere-compat-jbossweb</artifactId>
            <version>1.0.15</version>
        </dependency>
        <dependency>
            <groupId>org.atmosphere</groupId>
            <artifactId>atmosphere-compat-tomcat7</artifactId>
            <version>1.0.15</version>
        </dependency>

JBossWeb

        <dependency>
            <groupId>org.atmosphere</groupId>
            <artifactId>atmosphere-compat-tomcat</artifactId>
            <version>1.0.15</version>
        </dependency>
        <dependency>
            <groupId>org.atmosphere</groupId>
            <artifactId>atmosphere-compat-tomcat7</artifactId>
            <version>1.0.15</version>
        </dependency>

Note: If you are using a framework that build on top of atmosphere-runtime, make sure the dependency is EXCLUDED from the dependency tree to avoid issue. atmosphere-runtime IS NOT NEEDED when native is used.

Native WebSocket implementation with Native Comet support

To use native WebSocket support with native Comet support, you must add, in web.xml/application.xml

        <init-param>
            <param-name>org.atmosphere.useWebSocketAndServlet3</param-name>
            <param-value>false</param-value>
        </init-param>

and make sure you have read the previous section if you are using Tomcat or JBossWeb.

Step by Step Tutorials

Concepts & Architecture

15 Minutes Tutorial

Advanced Topics

API

Known WebServer Issues

References

External Documentations

githalytics.com alpha

Clone this wiki locally