Atmosphere error: WebSocket handshake error: unexpected response code: 501

After starting Glassfish, I get an error in the browser console (Chrome):


Connecting to a WebSocket with 'ws: // localhost: 8080 / mcweb / primepush / result-from-api? 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: WebSocket handshake error: Unexpected response code: 501

Website crash. Go to comets and resend


GlassFish Server 3.1.2.2

Core Fonts 4.0

pom.xml

<dependency>
     <groupId>org.atmosphere</groupId>
     <artifactId>atmosphere-runtime</artifactId>
     <version>2.0.3</version>
</dependency>

web.xml

<servlet>
    <servlet-name>Push Servlet</servlet-name>
    <servlet-class>org.primefaces.push.PushServlet</servlet-class>
    <init-param>
        <param-name>org.atmosphere.cpr.AtmosphereInterceptor</param-name>
        <param-value>org.atmosphere.interceptor.HeartbeatInterceptor</param-value>
    </init-param>
    <async-supported>true</async-supported>
</servlet>
<servlet-mapping>
    <servlet-name>Push Servlet</servlet-name>
    <url-pattern>/primepush/*</url-pattern>
</servlet-mapping>
+4
source share
1 answer

2.1.4 :

<h:outputScript
  library="primefaces"
  name="push/push.js"
  target="head"
/>
0

All Articles