Server Push is described as a
mechanism in which the server initiates a transaction to a client. This mechanism has various interesting
implementations which improve the options for interaction on a website such as counter.
There are various technologies which implement mechanisms to achieve the experience of server push such as
While implementing prime push using Web Sockets, I came across an issues with Tomcat that it is not behaving as required. After long search on Google I found that we need to open socket connection on Tomcat by replacing HTTP 1.1 protocol with
There are various technologies which implement mechanisms to achieve the experience of server push such as
- Native Comet (The WebServer has API for Comet)
- Native WebSockets (The WebServer has API for WebSocket)
- WebSockets
- Long-Polling
- Http Streaming
- JSONP
- Server-Sent Events
While implementing prime push using Web Sockets, I came across an issues with Tomcat that it is not behaving as required. After long search on Google I found that we need to open socket connection on Tomcat by replacing HTTP 1.1 protocol with
org.apache.coyote.http11.Http11NioProtocol
of connector
in the server.xml
file.
Server.xml Configuration
Implementation
Web.xml Configuration
Maven Dependencies
Counter Bean
Page.xhtml
2 Comments
Hi, what can you specify what sort issues you faced while implementing push in tomcat?
ReplyDeleteI cannot seem to make push work in Safari. Did you face this issue?
Eves,
DeleteI was facing issue in opening web socket in the tomcat. I have solved this using Http11NioProtocol protocol in my environment. In case you are facing some other issue let me know, I will try to solve this
Post a Comment