Ashish,
You cannot invalidate a session using HttpClient.
The 'request.getSession().invalidate()' is a J2EE way of 'invalidating' a
session on a servlet container. HttpClient doesn't even know about the
session on the server.
If on the server however you have a servlet which when invoked would
invalidate the session, you could use HttpClient to send in that request and
the session would be invalidated. Or you could just let the session expire
on its own.
Regards,
Bindul
On 5/4/06, Ashish Kulkarni <[EMAIL PROTECTED]> wrote:
Hi
I am doing the following
HttpClient client = new HttpClient();
PostMethod postMethod = new PostMethod(url);
postMethod.setRequestBody(data); postMethod.getParams
().setParameter(HttpMethodParams.RETRY_HANDLER,
new DefaultHttpMethodRetryHandler(3, false));
int statusCode = client.executeMethod(postMethod);
Now i want to invlidate the session created on server
Normally i would do
request.getSession().invalidate();
How to do it using http client
Ashish