问题描述
将应用程序(Primefaces 4.0 + Atmosphere 2.1)从 Tomcat 7.0.108 迁移到版本 8.5.63 时遇到问题。
在tomcat 7部署的版本中,websockets工作正常,但是当应用程序迁移到tomcat 8.5时,websockets不起作用,显示如下
WebSocket connection to 'ws://127.0.0.1/eventos/primepush/campanyas/ini/52501/52594/52595/52596/1536/1536/fin/2C53B02B2088FA5DA639DA21532E6BA9?X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=2.0.3-jquery&X-Atmosphere-Transport=websocket&X-Atmosphere-TrackMessageSize=true&X-Cache-Date=0&X-atmo-protocol=true' Failed: Error during WebSocket handshake: Unexpected response code: 200
Websocket Failed. Downgrading to Comet and resending
这是使用的配置
web.xml
<servlet>
<servlet-name>Push Servlet</servlet-name>
<servlet-class>org.primefaces.push.PushServlet</servlet-class>
<init-param>
<param-name>org.atmosphere.websocket.maxTextMessageSize</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.cpr.broadcasterCacheClass</param-name>
<param-value>org.atmosphere.cache.UUIDbroadcasterCache</param-value>
</init-param>
<async-supported>true</async-supported>
</servlet>
pom.xml
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>com.ning</groupId>
<artifactId>async-http-client</artifactId>
<version>1.7.5</version>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-runtime</artifactId>
<!-- <version>2.0.4</version> -->
<version>2.1.3</version>
</dependency>
知道我可以在哪里解决这个问题吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)