简体   繁体   中英

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,

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). 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?

Set it as a JavaScript variable or form hidden field. Then acces that from your applet

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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