0

I am using PrimeFaces 5.1, JSF 2.1 and tomcat 7 and my application is in AWS. atmosphere version 2.2.2.

I am not able to use push functionality in Safari 5.1.7.

We have configured the AWS to enable push based on Primeface push with AWS , Websocket with Tomcat 7 on AWS Elastic Beanstalk and Creation of .ebextensions folder in aws elastic beanstalk.

Push is working in all other browsers.

I tried the solution provided in primepush on Tomcat 7 not working which was unsuccessful.

Safari console shows enter image description here

Any help is appreciated..

Update1: one option is to try non secure websockets when safari browser is detected (from http://blog.marcon.me/post/24874118286/secure-websockets-safari). If so, the question is how to make the primefaces's push to select non secure web socket?

Update2: tried implementing SSL to see if push was not working in Safari due to our self signed certificate. that also didnot seem to work either.

Community
  • 1
  • 1
mehere
  • 1,487
  • 5
  • 28
  • 50

2 Answers2

2

Safari 5.1.7 is very old ... here https://github.com/Atmosphere/atmosphere/wiki/Safari-and-WebSockets-Issues is documented that there was issues with 5.1.5. I don't think that there was fix from .5 to .7 for that.

Trival
  • 553
  • 1
  • 5
  • 9
  • but for windows os , they have not provided any other higher versions of Safari.. – mehere May 18 '15 at 04:34
  • 1
    I know, for me is safari for windows like internet explorer< V7 ... a not supported browser-plattform. Maybe you should also think about it. – Trival May 18 '15 at 19:02
2

This problem occurred due to a missing configuration the web.xml. On analysing tomcat's log (catalina.out), found an error when Safari was trying to connnect to tomcat, ERROR org.atmosphere.cpr.AsynchronousProcessor - Invalid request state. AsyncContext#startAsync not supported.

On searching with this error, found a solution from https://groups.google.com/forum/#!topic/atmosphere-framework/D5-yrW6NzLU

Added <async-supported>true</async-supported> to shiroFilter in web.xml like

 <filter>
        <filter-name>shiroFilter</filter-name>
        <filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class>
        <async-supported>true</async-supported>
 </filter>

Using this, Safari 5.1.7 was able to use push functionality.

Hope this help somebody else like it helped me.

mehere
  • 1,487
  • 5
  • 28
  • 50