hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Srinivas Velidanda <svelida...@yahoo.com>
Subject Re: HttpClient query...
Date Tue, 05 Oct 2004 12:00:37 GMT
Hi Roland, 
thanks for the reply.
I am new to this API and pl let me know how can I do the following.
1. can I set the same parameters coming from the session before creating Multipart request
to the Multipart request, if yes, how can I set and how can these parameters can be referred
at the server side.
2.I am getting the session parameters in the JSP where I am creating Multipart request, but
once I post the Multipart request to the server the session is getting killed.
We are not working with cookies.
Is there a solution without using cookies or I must go for cookies..

Roland Weber <ROLWEBER@de.ibm.com> wrote:
Hello Srinivas,

if the session is handled by a session cookie, just make sure
you use the same HttpState object for all requests. That should
happen automagically if you do nothing special and re-use one
HttpClient for all requests.

If the server uses URL rewriting because it believes that the
client can't handle cookies, you have a problem. You will have
to parse server responses in order to extract URLs with the
session information encoded in them. Or convince the server
to send cookies.

hope that helps,

Srinivas Velidanda 
05.10.2004 13:32
Please respond to
"Commons HttpClient Project"


HttpClient query...


I am using HttpClient (commons-httpclient-3.0-alpha2) api for file upload.

How to handle a session if I am creating a MultipartPost request in a JSP 
and posting the request using client.executeMethod(mPost) to a servlet 

Once I send the request the session is getting killed and could not pass 
on the request to a specific handler in sequence..

Pl. let me know how to handle the session, if possible send me some sample 
code for that.

thanks in advance..


Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!

Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message