2013-06-20 87 views
1

对不起,这可能是一个简单的答案,但我找不到任何东西。HttpClient参数没有被添加到执行方法

我目前拥有的方法:

public MediaSource getConvertedMediaServletCall(String format) throws HttpException, IOException{ 

    HttpClient httpclient = new HttpClient(); 

    GetMethod httpGet = new GetMethod(MEDIA_SERVER_URL); 

    httpGet.getParams().setParameter("format", format); 
    httpGet.getParams().setParameter("handler", "handle"); 

    try{ 
     int statusCode = httpclient.executeMethod(httpGet); 

     byte[] responseBody = httpGet.getResponseBody(); 

现在我知道这做真正做任何事情,这有一次我得到的问题,工作要工作。问题是,我创建了我相信一个执行get方法的http客户端。现在的问题是当代码运行时httppath.executeMethod(httpGet); Servlet doGet方法正在执行,我知道这是事实,但参数永远不会从这个执行方法中传递。

Anyhelpwould理解..

回答