简体   繁体   English

有没有办法在小程序/任何 java 应用程序中使用 Java EE 中的 tomcat 服务器返回的信息?

[英]Is there any way to use the information returned from tomcat server in Java EE in an applet / any java application?

I want to use the clients to request IP addresses of other clients that are also requesting the IP addresses from the server, that is like a chat,我想使用客户端请求其他客户端的 IP 地址,这些客户端也从服务器请求 IP 地址,就像聊天一样,

example:例子:

client A requests IP address of available clients from server S. The client B also requests the IP address of available clients from server S. The server S sees two clients, and returns to client A the IP address of client B and it returns to client B the IP address of client A. Now I want to use the returned IP addresses in my applet (a multiplayer game involving sockets).客户端A向服务器S请求可用客户端的IP地址。客户端B也向服务器S请求可用客户端的IP地址。服务器S看到两个客户端,并向客户端A返回客户端B的IP地址,并返回给客户端B 客户端A的IP地址。现在我想在我的小程序(一个涉及套接字的多人游戏)中使用返回的IP地址。 Is there is any way to use the returned IP address from tomcat server S in my applet which may or may not be in a JSP page?有什么方法可以在我的小程序中使用从 tomcat 服务器 S 返回的 IP 地址,该地址可能在 JSP 页面中,也可能不在?

Set it as a JavaScript variable or form hidden field.将其设置为 JavaScript 变量或形成隐藏字段。 Then acces that from your applet然后从您的小程序访问它

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

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