简体   繁体   English

如何在Eclipse中使用带有嵌入式WTP插件的Jetty服务器使用Web套接字编写客户端服务器应用程序

[英]How to write client server application with web sockets using jetty server with embedded wtp plugin in eclipse

I am new to jetty. 我是码头的新手。 I want to use jetty web socket in my application. 我想在我的应用程序中使用码头网络插座。 I tried my best but unable to find a good tutorial how to write server and client. 我尽了最大努力,但是找不到如何编写服务器和客户端的好教程。 I want to write client in jquery and server in JAVA EE 1.6. 我想在jquery中编写客户端,并在JAVA EE 1.6中编写服务器。 I used http://wiki.eclipse.org/Jetty_WTP_Plugin/Jetty_WTP_Websocket_Wizard but there is some library error on private Outbound outbound; 我使用了http://wiki.eclipse.org/Jetty_WTP_Plugin/Jetty_WTP_Websocket_Wizard,但是私有出站出库有一些错误 So Please help me by providing a good tutorial having implementation in eclipse, jetty and jdk 1.6. 因此,请提供一个在eclipse,jetty和jdk 1.6中实现的优秀教程来帮助我。 I will be really very very thankful to you all. 我真的非常非常感谢大家。

The wtp wizards have not kept up with the latest released drafts (nor the final release of the spec) of the websocket protocol. wtp向导没有跟上websocket协议的最新发布的草案(也没有规范的最终版本)。

for an example of a websocket client and server in jetty take a look at the cometd project, they have a fully working setup with it. 以Jetty中的Websocket客户端和服务器为例,来看一下cometd项目,他们有一个完全正常的设置。

http://cometd.org/ http://cometd.org/

Alternately take a look at the test cases in jetty-websocket itself for other examples of working client and server examples in java. 另外,还可以查看jetty-websocket本身中的测试用例,以获得Java中工作客户端和服务器示例的其他示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM