求助:java中httpclient包怎么使用啊??尝试的get方法出错,怎么解决?
主要代码:HttpClient client = new HttpClient();
GetMethod get = new GetMethod("http://www.163.com/");//第17行!
client.executeMethod(get);
System.out.println(get.getResponseBodyAsString());
get.releaseConnection();
出错信息:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/codec/DecoderException
at org.apache.commons.httpclient.HttpMethodBase.<init>(HttpMethodBase.java:220)
at org.apache.commons.httpclient.methods.GetMethod.<init>(GetMethod.java:89)
at Httpclient.main(Httpclient.java:17)