Skip navigation.

CometD 2 & Servlet Containers

CometD 2 Configuration in Servlet Containers

CometD relies on Jetty Continuations, a library that is portable among servlet containers.

While CometD 2 runs natively in Jetty 7 and in Servlet 3 compliant servlet containers, it requires additional configuration for other servlet containers such as Jetty 6 or Tomcat 6.

These other servlet containers need a ContinuationFilter to be configured for the paths that make use of Jetty Continuations (in CometD this path is usually "/cometd/*"), for example:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns=""



In this example, the CometdServlet, which makes use of Jetty Continuations, is mapped to /cometd/*, and therefore the ContinuationFilter must also be mapped on that path.