• Post Reply Bookmark Topic Watch Topic
  • New Topic

Looking for WebSockets API (jarfile not javadocs)  RSS feed

 
Rob Tanner
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to experiment with WebSockets as a replacement for REST for a particular app. Supposedly, the Java WebSockets API is included in Java 7, but Eclipse cannot find the libraries so I manually added the import statements that I took from the book Java WebSocket Programing from Oracle press (shown below) but Eclipse can't resolve them.
I have googled looking for the WebSockets jarfile and I get hundreds of hits, but they are documentation and I've yet to find the jar or jars that I need.

Does anyone have the jar or jars and can zip them to me or better yet, a URL where I can find the actual jarfiles?

Thanks,

Rob Tanner
Linfield College
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat 7 and 8 have that library in their "lib" directory, as would -in some form- any other server that support WebSockets.
 
Rob Tanner
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good idea but Tomcat is not an EE complaint application and so the necessary jarfile is not there. But on the other hand, you got me to thinking. I have Tomee, which is an enhanced, EE compliant Tomcat, and yes I found the file websocket-api.jar. I was able to import the two packages and I'm off and running. Thanks for steering me in the right direction.

~ Rob
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good idea but Tomcat is not an EE complaint application and so the necessary jarfile is not there.

I'm not sure what you mean by "not JEE compliant" - it is not certified as such, but it is compliant with the JSR specifications it implements; those include WebSockets, and as such it does come with the required API jar file.
 
Rob Tanner
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat may implement some EE features but is not a fully Java EE compliant server but is, in my opinion, the server of choice for servlets and JSPs. You're right in that he Tomcat page on the Apache site does indeed say that it implements websockets but it's wrong when it says version 7.0 and above. I have 7.0.29, and no that distro does not include the websocket-api.jar. But just for grins, I downloaded the current version, 7.0.54, and yes that distro does include websocket-api.jar, but there lots of EE features not implemented. The Apache folks are trying or have already succeeded in getting Tomee certified as Fully compiant.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but there lots of EE features not implemented

Of course not - Tomcat is not a JEE server, and not meant to be. TomEE isn't either, it's certified for the JEE Web Profile, not as a full JEE server.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!