Jetty 8网络插座 [英] Jetty 8 web sockets

查看:102
本文介绍了Jetty 8网络插座的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载了最新的Jetty 8 Hightide,但是无法使WebSockets正常工作.我解压缩发行版,将.war文件放到webapps文件夹中,然后开始:

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:

java.lang.NoClassDefFoundError: org/eclipse/jetty/websocket/WebSocketServlet

我已经验证JETTY_HOME/lib文件夹包含jetty-websocket.jar并且它包含WebSocketServlet类文件.

I've verified that the JETTY_HOME/lib folder contains the jetty-websocket.jar and it contains the WebSocketServlet class file.

我在里程碑发布之前就已经运行过了.

I've had this running before with the milestone releases.

推荐答案

由于某些原因,默认情况下似乎不再提供Web套接字,因此上下文XML文件中需要以下代码:

For some reason, it appears that web sockets are no longer available by default, so the following code is needed in the context XML file:

<Set name="extraClasspath"><SystemProperty name="jetty.home" default="."/>/lib/jetty-websocket-<version>.jar</Set>

这篇关于Jetty 8网络插座的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆