//working fine so far but then...
HttpPost httpPost = new HttpPost(
List<NameValuePair> nvps = new ArrayList<NameValuePair>();
nvps.add(new BasicNameValuePair("userid", "xxxx"));
nvps.add(new BasicNameValuePair("password", "xxxx"));
HttpResponse response2 = httpclient.execute(httpPost);
is giving me a 302 error all the time. I believe it has something to do with the session as the form method calls:
but i lack the experience to know how to handle this.
So now I don't know what your question is. You say you know what the HTTP 302 response code, even though you called it an "error" in your original post. (It isn't an error code.) So given that you know what it means, you should be able to implement it by sending a new request to the location specified in the response. Did you try that?