hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thandra, Kiran" <Extern.Kiran.Than...@vw.com>
Subject NOSUCH METHOD ERROR
Date Wed, 11 Dec 2002 23:26:47 GMT

Its with my previous question .
If i use this i get a file not found error.
org.apache.commons.httpclient.methods.GetMethod("/xyzUsrEdit.asp"");

basically my file path is different

org.apache.commons.httpclient.methods.GetMethod("/abc/xyzUsrEdit.asp"");

It gives me 

 No such method exists:
 org.apache.commons.httpclient.methods.GetMethod get = new
 org.apache.commons.httpclient.methods.GetMethod("/abc/xyzUsrEdit.asp"");



get.execute(state,conne) it gives me a compile time error says No such
method exists


I think it is some thing to do with the PATH


When we are going to get a latest released version .

I appreciate your time.

Thanks,
Thandra

-----Original Message-----
From: Oleg Kalnichevski [mailto:o.kalnichevski@dplanet.ch]
Sent: Wednesday, December 11, 2002 5:52 PM
To: Commons HttpClient Project
Subject: Re: Questions about executing multiple methods in one session


HttpClient.startSession() and HttpClient.endSession() methods have been
deprecated. Do not use them.

Use the following pattern to execute multiple methods:

HttpClient client = new HttpClient();
client.getHostConfiguration().setHost(host, port, "http");

GetMethod httpget = new GetMethod("/first");
method.setUseDisk(false);

client.executeMethod(httpget);
String response1 = method.getResponseBodyAsString();
        
httpget.recycle();

httpget.setPath("/second");
client.executeMethod(httpget);
String response2 = method.getResponseBodyAsString();
        
httpget.recycle();

httpget.setPath("/third");
client.executeMethod(httpget);
String response3 = method.getResponseBodyAsString();


Http protocol does not support sessions as such, it's been designed as a
stateless, request/response based protocol. HttpSession is a logical
concept, implemented using a cookie that contains a session id that
uniquely identifies a series of logically related HTTP requests. HTTP
Session times out when cookie expires

Oleg 



On Wed, 2002-12-11 at 18:28, Thandra, Kiran wrote:
> Hello,
> What does clinet.startSession() mean? Is it similat to our HttpSession .Do
> we have any session time outs for this session.Can i execute any number of
> methods whithin this session.
> 
> Thanks
> Thandra
> 
> -----Original Message-----
> From: Kalnichevski, Oleg [mailto:oleg.kalnichevski@bearingpoint.com]
> Sent: Wednesday, December 11, 2002 7:55 AM
> To: Commons HttpClient Project
> Subject: [PATCH] PostMethod does properly recycle when request buffering
> is used
> 
> 
> Please use TestPostRecycle test case to reproduce the problem. The patch
> attached below should fix the problem
> 
> Oleg
> 
> --
> To unsubscribe, e-mail:
<mailto:commons-httpclient-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:commons-httpclient-dev-help@jakarta.apache.org>
-- 
Oleg Kalnichevski <o.kalnichevski@dplanet.ch>


--
To unsubscribe, e-mail:
<mailto:commons-httpclient-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:commons-httpclient-dev-help@jakarta.apache.org>

Mime
View raw message