Jetty 8网络插座

编程入门 行业动态 更新时间:2024-10-24 17:29:59
本文介绍了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网络插座

本文发布于:2023-11-23 10:11:32,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1621066.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:插座   网络   Jetty

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!