Structure of an Atmosphere Application - Atmosphere/atmosphere Wiki

This apply only to Atmosphere 1.0.x. For 1.1, see this

An Atmosphere's application structure must always contains the following files in order to maintains portability amongst WebServers

./META-INF
./META-INF/context.xml                             (1)
./WEB-INF
./WEB-INF/context.xml                              (2)
./WEB-INF/lib
./WEB-INF/lib/atmosphere-compat-jbossweb-1.0.0.jar (3)
./WEB-INF/lib/atmosphere-compat-tomcat-1.0.0.jar   (4)
./WEB-INF/lib/atmosphere-compat-tomcat7-1.0.0.jar  (5)
./WEB-INF/lib/atmosphere-runtime-1.0.0.jar         (6)
./WEB-INF/lib/slf4j-api-1.6.1.jar                  (7)
  • (1) Required to execute on Tomcat when (4) or (5) is included
  • (2) Required to execute on JBoss
  • (3) Required to execute on all WebServer, optional in JBoss
  • (4) Required to execute on all WebServer, optional in Tomcat 6
  • (5) Required to execute on all WebServer, optional in Tomcat 7
  • (6) Atmosphere's core classes, always required.
  • (7) Logging library, always required.

You can remove some of the files if you don't need portability.
For example, you can deploy Atmosphere with only the following jars if you target a single server:

Tomcat 6 only:

./META-INF
./WEB-INF/lib/atmosphere-compat-jbossweb-1.0.0.jar 
./WEB-INF/lib/atmosphere-compat-tomcat7-1.0.0.jar  
./WEB-INF/lib/atmosphere-runtime-1.0.0.jar         
./WEB-INF/lib/slf4j-api-1.6.1.jar                  

Tomcat 7 only:

./META-INF
./WEB-INF/lib/atmosphere-compat-jbossweb-1.0.0.jar 
./WEB-INF/lib/atmosphere-compat-tomcat-1.0.0.jar  
./WEB-INF/lib/atmosphere-runtime-1.0.0.jar         
./WEB-INF/lib/slf4j-api-1.6.1.jar                  

JBoss only:

./WEB-INF
./WEB-INF/lib/atmosphere-compat-tomcat-1.0.0.jar  
./WEB-INF/lib/atmosphere-compat-tomcat7-1.0.0.jar  
./WEB-INF/lib/atmosphere-runtime-1.0.0.jar         
./WEB-INF/lib/slf4j-api-1.6.1.jar                  

The idea is that you don't need the jar file of the container you are deploying to. Finally, if you are only deploying on WebServers that supports Servlet 3.0 by default, you can completely remove the context.xml file.

⚠️ **GitHub.com Fallback** ⚠️