• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

WebSockets with Servlets

 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm a bit confused as to which Servlet specification version has WebSocket support and what is the Java EE version for it? Does Servlet spec 3.1 requires a Java EE 7 container? The reason being that I want to use WebSockets in one of my WebApp and I'm aware that WebSocket support is available only with Servlet spec 3.1.

Does the Java EE 7 container like Glassfish 4 or Tomcat 7 require Java 7? Can't it run with Java 6?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tomcat 7 is a JEE 6 container; Tomcat 8 will support JEE 7. However, Tomcat 7 does support WebSockets if you use Java 7. See http://tomcat.apache.org/whichversion.html.
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for that. Are WebSockets communication between client and server is always asynchronous?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are plenty of WebSocket tutorials on the web that can answer your basic questions.
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:There are plenty of WebSocket tutorials on the web that can answer your basic questions.



It was actually one of those poorly written tutorials that actually got me confused. That is the reason why in the first place, I posted my question here. If I have to trust Wikipedia, WebSockets are by default not asynchronous. I just wanted to know from fellow ranchers if they have used WebSockets in asynchronous mode?
 
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Joe Harry wrote: If I have to trust Wikipedia, WebSockets are by default not asynchronous.



They are not designed to be synchronous, only asynchronous otherwise the full duplex communication would be faked. It doesn't make sense to want to use them synchronously. It's really like asking if you can use a boat in the air instead of in water. You could make some modifications to make it happen but what would be the point of that.

Which statement on Wikipedia suggests that "WebSockets are by default not asynchronous."?
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

E Armitage wrote:
They are not designed to be synchronous, only asynchronous otherwise the full duplex communication would be faked. It doesn't make sense to want to use them synchronously. It's really like asking if you can use a boat in the air instead of in water. You could make some modifications to make it happen but what would be the point of that.

Which statement on Wikipedia suggests that "WebSockets are by default not asynchronous."?



Wikipedia just does not say that it is asynchronous. It actually does not say anything about this. What you say makes sense to me. If I think about a full duplex communication mode, like a land line telephone, it justifies to me that WebSockets in nature is asynchronous.
 
E Armitage
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's still a stretch to conclude that Wikipedia suggests that Websockets are by default not asynchronous.
 
I got this tall by not having enough crisco in my diet as a kid. This ad looks like it had plenty of shortening:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic