jarnbjo
jarnbjo

Reputation: 34313

WebSockets served by a Servlet Container

I was taking a look at WebSockets last week and made a few thoughts on how to implement the server side with the Java Servlet API. I didn't spend too much time, but ran into the following problems during a few tests with Tomcat, which seem impossible to solve without patching the container or at least making container specific modifications to the HttpServletResponse implementation:

Am I missing something obvious, or is it really not possible to integrate WebSocket server endpoints in a servlet based web app?

Upvotes: 14

Views: 17626

Answers (4)

Oliver
Oliver

Reputation: 11

jWebSocket claims to run as a Tomcat application. Unfortunately some files are missing in the binary distribution of jWebSocket. Some people are trying to recompile jWebSocket and get the necessary files, since the source code is available. All in all, jWebSocket does not seem as a reliable product.

Upvotes: 0

dlaidlaw
dlaidlaw

Reputation: 1773

The Glassfish Atmosphere project will do what you want. There is a servlet you can define to do all the work.

Upvotes: 6

Horcrux7
Horcrux7

Reputation: 24447

There is an implementation in Jetty. We can hope that tomcat and jetty find a compatible API.

Upvotes: 8

Predrag Stojadinović
Predrag Stojadinović

Reputation: 3659

Yes there is a very good one (open source and completely free): http://www.jWebSocket.org

Upvotes: -3

Related Questions