今天部署一个应用程序出现问题,在tomcat上测试好好的,但是部署到weblogic之后报错:weblogic.net.http.SOAPHttpsURLConnection cannot be cast to javax.net.ssl.HttpsURLConnection,是在调用post或者get方法时候出错的。
经过查阅资料后找到两种解决办法,测试真实有效:
1、构造url使用新的构造方法(推荐使用):
URL url = new URL(null, urlstr, new sun.net.www.protocol.http.Handler());
或者
URL ur

最低0.47元/天 解锁文章
1357





