[英]Desktop app. communicate with remote Tomcat servlet
I am looking for some code examples of a local java program that communicates with a servlet on a tomcat server. 我正在寻找与tomcat服务器上的servlet通信的本地Java程序的一些代码示例。
I am trying to write a program that can send a single string to the server and be returned another string. 我正在尝试编写一个程序,该程序可以将单个字符串发送到服务器并返回另一个字符串。 Quite a simple thing but cannot find any tutorials or examples for communication with a remote server. 很简单,但是找不到与远程服务器通信的任何教程或示例。
Just a simple google 只是一个简单的谷歌
http://www.frank-buss.de/echoservlet/index.html http://www.frank-buss.de/echoservlet/index.html
alternatively the sun server/client example tutorial is here. 另外,这里还有sun服务器/客户端示例教程。
http://download.oracle.com/javase/tutorial/networking/sockets/clientServer.html http://download.oracle.com/javase/tutorial/networking/sockets/clientServer.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.