0

I am trying to use Websockets for my webapp, for pushing data from server to browser. I am using Java 1.6 (Can not upgrade to java 1.7 due to other dependencies) and I need this to work on any containers like Tomcat, WebLogic, JBoss, etc...

Two libraries I could found are –

  1. “java-websocket” – http://java-websocket.org/
  2. “javax.websocket” – http://repo1.maven.org/maven2/javax/websocket/javax.websocket-api/1.0/

Server example provided with “java-websocket” is like a standalone Java Program. But I am trying to find a solution which integrates into my webapp.

My webapp address looks like this - http://localhost:8080/demo i.e. runs on say port 8080. However, java-websocket Server needs a port to start. Which means it does not interrelate well into my webapp.

Second library “javax.websocket” which works very well in a webapp context. But I cannot use it because it needs Java 1.7, and I am using Java 1.6.

Does anyone know whether it is possible at all to use “java-websocket” in webapp context? Or may be is there any other better library for this need which works with Java 1.6?

Thank you in advance.

Subodh
  • 36
  • 3
  • Possible duplicate of [WebSockets production ready server in Java?](http://stackoverflow.com/questions/4278456/websockets-production-ready-server-in-java) – Sam Dec 16 '16 at 09:18
  • Thanks, but possibly not a duplicate. That thread is for websocket in Java, and this question is for websocket in webapp. – Subodh Dec 16 '16 at 11:54

0 Answers0