使用HttpsConnection遇到问题了,请大家赐教。
我在程序中使用HttpsConnection进行联网,主要代码如下:
private HttpsConnection con;
private DataInputStream dis;
。。。。。。。。。
String url = "https://cac-iygxaukhsls.wy.com:8443/travel/Query?location=" + lo;
System.out.println(url);
try {
con = (HttpsConnection) Connector.open(url);
System.out.println("1");
dis = con.openDataInputStream();
System.out.println("2");
。。。。。。。。。
在JB里运行时,系统显示:
Running with storage root DefaultColorPhone
https://cac-iygxaukhsls.wy.com:8443/travel/Query?location=丽江
1
Uncaught exception java/lang/NullPointerException.
生成的URL是可以在IE里访问的,但就是不知道怎么在JB运行时会有异常出现。请大家赐教。谢谢。
private HttpsConnection con;
private DataInputStream dis;
。。。。。。。。。
String url = "https://cac-iygxaukhsls.wy.com:8443/travel/Query?location=" + lo;
System.out.println(url);
try {
con = (HttpsConnection) Connector.open(url);
System.out.println("1");
dis = con.openDataInputStream();
System.out.println("2");
。。。。。。。。。
在JB里运行时,系统显示:
Running with storage root DefaultColorPhone
https://cac-iygxaukhsls.wy.com:8443/travel/Query?location=丽江
1
Uncaught exception java/lang/NullPointerException.
生成的URL是可以在IE里访问的,但就是不知道怎么在JB运行时会有异常出现。请大家赐教。谢谢。
...全文
相关推荐
使用httplib获取google首页的html
使用httplib获取google首页的html
python3 http提交json参数并获取返回值的方法
今天小编就为大家分享一篇python3 http提交json参数并获取返回值的方法,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
深入理解Python3中的http.client模块
主要介绍了关于Python3中http.client模块的相关资料,文中介绍的非常详细,需要的朋友可以参考借鉴,下面来一起看看吧。
pySchannelSSL:使用Windows Schannel CryptoAPI SSL实现的Python 3 HTTPSHandler替代
pySchannelSSL 使用Windows Schannel CryptoAPI SSL实现的Python 3 HTTPSHandler替代
对python3标准库httpclient的使用详解
今天小编就为大家分享一篇对python3标准库httpclient的使用详解,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧


J2ME
