Jetty 8 web sockets

前端 未结 4 2115
灰色年华
灰色年华 2021-01-06 12:59

I\'ve downloaded the latest Jetty 8 Hightide, but cannot get WebSockets to work. I unzip the distribution, put my .war file in the webapps folder and start:

         


        
4条回答
  •  [愿得一人]
    2021-01-06 13:49

    I experienced the same using jetty-maven-plugin and version 8.0.3.v20111011. However the solution was simple. Just include the jetty-websocket as a compiled scope dependency (i.e. don't declared scope).

    Relevant sections of pom.xml:

    ...
    
        UTF-8
        8.0.3.v20111011
    
    ...
    
    
        
            ...
            
                org.mortbay.jetty
                jetty-maven-plugin
                ${jetty.version}
            
        
    
    
    
        
            org.eclipse.jetty
            jetty-websocket
            ${jetty.version}
        
        ...
    
    

提交回复
热议问题