0

I am trying to write Java application which send data to Web client (HTML/js) via NodeJs web server. Also the same java application should receive message from the web client on button click. Let me know how this can be done.

Any example code available on this?

4

1 回答 1

0

查看此链接以获取一些示例项目:
http ://docs.oracle.com/javaee/7/tutorial/doc/websocket.htm

您可以通过单击按钮从客户端接收消息,但只有客户端本身可以发送消息,因此按钮单击应该向客户端发送消息,要求其响应。

于 2013-09-19T13:04:13.607 回答