primefaces使用AWS Tomcat7在Safari中无法正常工作

时间:2015-05-15 11:30:40

标签: tomcat primefaces safari websocket push

我正在使用PrimeFaces 5.1,JSF 2.1和tomcat 7,我的应用程序在AWS中。大气版2.2.2。

我无法在Safari 5.1.7中使用推送功能。

我们已将AWS配置为根据Primeface push with AWSWebsocket with Tomcat 7 on AWS Elastic BeanstalkCreation of .ebextensions folder in aws elastic beanstalk启用推送。

推送适用于所有其他浏览器。

我尝试了primepush on Tomcat 7 not working中提供的不成功的解决方案。

Safari控制台显示enter image description here

感谢任何帮助..

Update1:​​一个选项是在检测到safari浏览器时尝试非安全的websockets(来自http://blog.marcon.me/post/24874118286/secure-websockets-safari)。如果是这样,问题是如何让推文选择非安全的网络套接字?

Update2:尝试实施SSL以查看由于我们的自签名证书,推送在Safari中是否无效。这似乎也没有用。

2 个答案:

答案 0 :(得分:2)

Safari 5.1.7很老了......这里记录了https://github.com/Atmosphere/atmosphere/wiki/Safari-and-WebSockets-Issues 5.1.5的问题。我认为没有从.5到.7的修复。

答案 1 :(得分:2)

由于缺少web.xml配置而发生此问题。 在分析tomcat的日志(catalina.out)时,当Safari尝试连接到tomcat时发现错误,<async-supported>true</async-supported>

使用此错误进行搜索时,找到了来自https://groups.google.com/forum/#!topic/atmosphere-framework/D5-yrW6NzLU

的解决方案

将<{1}}添加到web.xml中的shiroFilter,如

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

使用此功能,Safari 5.1.7能够使用推送功能。

希望这有助于其他人帮助我。