Search code examples
atmospheretomcat10

Atmosphere Tomcat 10 Descriptor-less deployment


I'm starting to develop a new webapp, I have some past experience but this isn't my strongest area. In the past we've used Tomcat 8.5, Jersey for rest services and additionally atmosphere for websockets and realtime notifications configured through a web.xml.

Starting a new project I wanted to pick up the latest versions of everything. I have tomcat 10 and jersey running together without a web.xml and I was just wanting to add atmosphere in. As far as I understand atmosphere 3.0.2 should be fine with servlet-api 5.0.0. When tomcat starts I can see org.atmosphere.cpr.ContainerInitializer runs but it doesn't find the AtmosphereServlet.

Is there something extra that's needed to make this available? I can see it on the classpath but I'm not sure what is needed to make tomcat incorporate it into the ServletContext servlet registrations as atmosphere seems to expect.

Thanks for any help.


Solution

  • Possibly a Friday afternoon problem.

    Annotating my extension of AtmosphereServlet as a @WebServlet and including a url pattern in the annotation causes everything to spark into life.