Primefaces 不支持Websocket

Primefaces 不支持Websocket,primefaces,websocket,push,websphere-liberty,atmosphere,Primefaces,Websocket,Push,Websphere Liberty,Atmosphere,我正在尝试使用primefaces push创建websocket,我收到一条消息:websocket协议不受支持,我的浏览器中有许多线程处于活动状态 我用 websphere liberty 8.5.5.8 大气2.3.5 primefaces 5.2 这是我的web.xml <?xml version="1.0" encoding="UTF-8" ?> <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/ja

我正在尝试使用primefaces push创建websocket,我收到一条消息:websocket协议不受支持,我的浏览器中有许多线程处于活动状态

我用

  • websphere liberty 8.5.5.8
  • 大气2.3.5
  • primefaces 5.2
这是我的web.xml

<?xml version="1.0" encoding="UTF-8" ?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <listener>
        <listener-class>mx.com.telcel.di.sds.gsac.dsc.monitor.dashboard.negocio.listener.CargaCatalogoListener</listener-class>
    </listener>

    <context-param>
        <param-name>spring.profiles.active</param-name>
        <param-value>dev</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.FACELETS_VIEW_MAPPINGS</param-name>
        <param-value>*.xhtml</param-value>
    </context-param>
    <context-param>
        <param-name>com.sun.faces.enableRestoreView11Compatibility</param-name>
        <param-value>true</param-value>
    </context-param>
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    < async-supported>true</async-supported>
    </servlet>
    <mime-mapping>
        <extension>xhtml</extension>
        <mime-type>text/html</mime-type>
    </mime-mapping>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
        <welcome-file>faces/resources/pages/general/dashboard/dashboard.xhtml</welcome-file>
    </welcome-file-list>
    <session-config>
        <session-timeout>60</session-timeout>
    </session-config>


   <servlet>
    <servlet-name>PrimePushServlet</servlet-name>
    <servlet-class>org.primefaces.push.PushServlet</servlet-class>
    <init-param>
        <param-name>org.atmosphere.cpr.broadcasterCacheClass</param-name>
        <param-value>org.atmosphere.cache.UUIDBroadcasterCache</param-value>
    </init-param>
    <init-param>
        <param-name>org.atmosphere.annotation.packages</param-name>
        <param-value>org.primefaces.push</param-value>
    </init-param>
    <init-param>
        <param-name>org.atmosphere.cpr.packages</param-name>
        <param-value>mx.com.telcel.di.sds.gsac.dsc.monitor.dashboard.presentacion.bean.dashboard.push</param-value>
    </init-param>
    <init-param>
        <param-name>org.atmosphere.container.JSR356AsyncSupport</param-name>
        <param-value>true</param-value>
    </init-param>
    <init-param>
        <param-name>org.atmosphere.useWebSocket</param-name>
        <param-value>true</param-value>
    </init-param>
    <init-param>
        <param-name>org.atmosphere.useBlocking</param-name>
        <param-value>true</param-value>
</init-param>
    <load-on-startup>1</load-on-startup>
    <async-supported>true</async-supported>
    </servlet>


    <servlet-mapping> 
        <servlet-name>PrimePushServlet</servlet-name> 
        <url-pattern>/primepush/*</url-pattern> 
    </servlet-mapping> 
</web-app>

是否在server.xml中启用了“websocket-1.1”功能?是否启用了localConnector-1.0 jsp-2.3 servlet-3.1 websocket-1.1 wasJmsClient-2.0 javaMail-1.5 jndi-1.0 jpa-2.1
[LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere is using org.atmosphere.cpr.DefaultAnnotationProcessor for processing annotation
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.DefaultAnnotationProcessor - AnnotationProcessor class org.atmosphere.cpr.DefaultAnnotationProcessor$ServletContainerInitializerAnnotationProcessor being used
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AnnotationHandler - Found Annotation in class org.primefaces.push.impl.PushEndpointInterceptor being scanned: interface org.atmosphere.config.service.AtmosphereInterceptorService
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AnnotationHandler - Found Annotation in class org.primefaces.push.impl.PushEndpointProcessor being scanned: interface org.atmosphere.config.AtmosphereAnnotation
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AnnotationHandler - Found Annotation in class org.primefaces.push.impl.PushEndpointMapper being scanned: interface org.atmosphere.config.service.EndpointMapperService
[err] [LargeThreadPool-thread-28] WARN org.atmosphere.cpr.DefaultAnnotationProcessor - Unable to scan using File. Scanning classpath
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AnnotationHandler - Found Annotation in class mx.com.telcel.di.sds.gsac.dsc.monitor.dashboard.presentacion.bean.dashboard.push.NotifyResource being scanned: interface org.atmosphere.config.service.AtmosphereService
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AnnotationHandler - Found Annotation in class mx.com.telcel.di.sds.gsac.dsc.monitor.dashboard.presentacion.bean.dashboard.push.InciTimePush being scanned: interface org.atmosphere.config.service.AtmosphereService
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AnnotationHandler - Found Annotation in class mx.com.telcel.di.sds.gsac.dsc.monitor.dashboard.presentacion.bean.dashboard.push.TimeLinePush being scanned: interface org.atmosphere.config.service.AtmosphereService
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AnnotationHandler - Found Annotation in class mx.com.telcel.di.sds.gsac.dsc.monitor.dashboard.presentacion.bean.dashboard.push.NotifyResource being scanned: interface org.primefaces.push.annotation.Singleton
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AnnotationHandler - Found Annotation in class mx.com.telcel.di.sds.gsac.dsc.monitor.dashboard.presentacion.bean.dashboard.push.InciTimePush being scanned: interface org.primefaces.push.annotation.Singleton
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AnnotationHandler - Found Annotation in class mx.com.telcel.di.sds.gsac.dsc.monitor.dashboard.presentacion.bean.dashboard.push.TimeLinePush being scanned: interface org.primefaces.push.annotation.Singleton
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AnnotationHandler - Found Annotation in class mx.com.telcel.di.sds.gsac.dsc.monitor.dashboard.presentacion.bean.dashboard.push.NotifyResource being scanned: interface org.primefaces.push.annotation.PushEndpoint
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.util.ForkJoinPool - Using ForkJoinPool  org.atmosphere.util.JDK7ForkJoinPool. Set the org.atmosphere.cpr.broadcaster.maxAsyncWriteThreads to -1 to fully use its power.
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereHandler org.primefaces.push.impl.PushEndpointHandlerProxy mapped to context-path /notify and Broadcaster Class org.atmosphere.cpr.DefaultBroadcaster
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor [@PushEndpoint Interceptor] mapped to AtmosphereHandler org.primefaces.push.impl.PushEndpointHandlerProxy
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AnnotationHandler - Found Annotation in class mx.com.telcel.di.sds.gsac.dsc.monitor.dashboard.presentacion.bean.dashboard.push.InciTimePush being scanned: interface org.primefaces.push.annotation.PushEndpoint
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereHandler org.primefaces.push.impl.PushEndpointHandlerProxy mapped to context-path /inciTimep and Broadcaster Class org.atmosphere.cpr.DefaultBroadcaster
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor [@PushEndpoint Interceptor] mapped to AtmosphereHandler org.primefaces.push.impl.PushEndpointHandlerProxy
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AnnotationHandler - Found Annotation in class mx.com.telcel.di.sds.gsac.dsc.monitor.dashboard.presentacion.bean.dashboard.push.TimeLinePush being scanned: interface org.primefaces.push.annotation.PushEndpoint
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereHandler org.primefaces.push.impl.PushEndpointHandlerProxy mapped to context-path /timelinep and Broadcaster Class org.atmosphere.cpr.DefaultBroadcaster
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor [@PushEndpoint Interceptor] mapped to AtmosphereHandler org.primefaces.push.impl.PushEndpointHandlerProxy
[err] [LargeThreadPool-thread-28] WARN org.atmosphere.cpr.DefaultAnnotationProcessor - Unable to scan using File. Scanning classpath
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Auto detecting WebSocketHandler in /WEB-INF/classes/
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol 
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Installing Default AtmosphereInterceptors
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework -     org.atmosphere.interceptor.CorsInterceptor : CORS Interceptor Support
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework -     org.atmosphere.interceptor.CacheHeadersInterceptor : Default Response's Headers Interceptor
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework -     org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework -     org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework -     org.atmosphere.interceptor.HeartbeatInterceptor : Heartbeat Interceptor Support
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework -     org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework -     org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework -     org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework -     org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework -     org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework -     org.atmosphere.interceptor.IdleResourceInterceptor : org.atmosphere.interceptor.IdleResourceInterceptor
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them.
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor Atmosphere LifeCycle with priority AFTER_DEFAULT 
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor  Track Message Size Interceptor using | with priority BEFORE_DEFAULT 
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor CORS Interceptor Support with priority FIRST_BEFORE_DEFAULT 
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor Default Response's Headers Interceptor with priority AFTER_DEFAULT 
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor Browser Padding Interceptor Support with priority AFTER_DEFAULT 
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor Android Interceptor Support with priority AFTER_DEFAULT 
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.interceptor.HeartbeatInterceptor - HeartbeatInterceptor configured with padding value 'X', client frequency 60 seconds and server frequency 0 seconds
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor Heartbeat Interceptor Support with priority AFTER_DEFAULT 
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor SSE Interceptor Support with priority AFTER_DEFAULT 
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor JSONP Interceptor Support with priority AFTER_DEFAULT 
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor Atmosphere JavaScript Protocol with priority AFTER_DEFAULT 
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor with priority AFTER_DEFAULT 
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor Browser disconnection detection with priority AFTER_DEFAULT 
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor org.atmosphere.interceptor.IdleResourceInterceptor with priority BEFORE_DEFAULT 
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Using EndpointMapper class org.primefaces.push.impl.PushEndpointMapper
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Using BroadcasterCache: org.atmosphere.cache.UUIDBroadcasterCache
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Default Broadcaster Class: org.atmosphere.cpr.DefaultBroadcaster
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Broadcaster Shared List Resources: false
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Broadcaster Polling Wait Time 100
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Shared ExecutorService supported: true
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Messaging ExecutorService Pool Size unavailable - Not instance of ThreadPoolExecutor
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Async I/O Thread Pool Size: 200
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Using AtmosphereResurceFactory: org.atmosphere.cpr.DefaultAtmosphereResourceFactory
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Invoke AtmosphereInterceptor on WebSocket message true
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - HttpSession supported: false
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere is using org.atmosphere.inject.InjectableObjectFactory for dependency injection and object creation
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere is using async support: org.atmosphere.container.BlockingIOCometSupport running under container: IBM WebSphere Liberty/8.5.5.8
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere Framework 2.3.5 started.
[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - 

    For Atmosphere Framework Commercial Support, visit 
    http://www.async-io.org/ or send an email to support@async-io.org

[err] [LargeThreadPool-thread-28] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor @PushEndpoint Interceptor with priority AFTER_DEFAULT 
[INFORMACIÓN] SRVE0242I: [Monitor] [/Monitor] [PrimePushServlet]: Inicialización satisfactoria.
[INFORMACIÓN] CDI @ViewScoped bean functionality unavailable
[INFORMACIÓN] CDI @ViewScoped bean functionality unavailable
[INFORMACIÓN] CDI @ViewScoped bean functionality unavailable
[INFORMACIÓN] CDI @ViewScoped bean functionality unavailable
[INFORMACIÓN] CDI @ViewScoped bean functionality unavailable
[err] [LargeThreadPool-thread-51] WARN org.atmosphere.cpr.AsynchronousProcessor - Websocket protocol not supported
[err] [LargeThreadPool-thread-65] WARN org.atmosphere.cpr.AsynchronousProcessor - Websocket protocol not supported