读书人

!httpclient2.0的替代方法

发布时间: 2012-09-27 11:11:17 作者: rapoo

求助!httpclient2.0的替代方法
本人初次接触httpclient,项目中用的是httpclient3.0jar包,和其它包有冲突,要把其中一个方法改为httpclient2.0的实现方法,请高手告知,谢谢。
代码:

HttpState inits = new HttpState();
inits.setCredentials(new AuthScope("localhost",8082,null), new UsernamePasswordCredentials("admin","admin"));
// AuthScope 是httpclient3.0的类,inits.setCredentials()转换成httpclient2.0方法,如何实现?

[解决办法]
重写classLoader

读书人网 >J2EE开发

热点推荐