Search code examples
javascriptjsf-2websockettomcat6long-polling

Looking to introduce browser push/bidirectional communications to my JSF application


I am looking into methods to introduce push technology to my JSF web application. I am currently serving this need using JavaScript polling and this is too costly for a serious web application.

I've read about some possible options but I don't want to limit my answers to these since I am not sure how good they are so I will not name them.

I am running on top of Tomcat 6, JSF 2.0 and using jQuery on the client Side.

Thanks!


Solution

  • PrimeFaces <p:push> uses websockets. This only requires Jetty running next to Tomcat on a different port, because Jetty supports websockets natively (Tomcat 6 doesn't, only Tomcat 8 or newer does). See chapter 6 of User's Guide for detailed explanation. Another alternative is ICEfaces Ajax Push.