开发者

How to set a value for the url parameter of Connector.open if the target is a local computer?

开发者 https://www.devze.com 2023-03-26 17:01 出处:网络
There is a Linux computer which is a web server , and I want to make a HttpConnection to it through the Connector.ope开发者_如何学Cn method. So if the IP address of the web-server is 192.168.1.123 how

There is a Linux computer which is a web server , and I want to make a HttpConnection to it through the Connector.ope开发者_如何学Cn method. So if the IP address of the web-server is 192.168.1.123 how to make the HttpConnection ?


Connection is made by following:

import javax.microedition.io.Connector;
import javax.microedition.io.HttpConnection;

try
{
  HttpConnection connection=(HttpConnection)Connector.open(url);
}
catch(Exception ex)
{

}

in the above statements url is the url of the service/web,etc.It includes the server ip address , web app name,port,etc.

Thanks & Regards,

0

精彩评论

暂无评论...
验证码 换一张
取 消