Return-Path: Delivered-To: apmail-jakarta-httpclient-user-archive@www.apache.org Received: (qmail 59219 invoked from network); 14 May 2006 13:54:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 May 2006 13:54:48 -0000 Received: (qmail 82494 invoked by uid 500); 14 May 2006 13:54:47 -0000 Delivered-To: apmail-jakarta-httpclient-user-archive@jakarta.apache.org Received: (qmail 82434 invoked by uid 500); 14 May 2006 13:54:47 -0000 Mailing-List: contact httpclient-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: "HttpClient User Discussion" Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-user@jakarta.apache.org Received: (qmail 82422 invoked by uid 99); 14 May 2006 13:54:46 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 May 2006 06:54:46 -0700 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=HTML_MESSAGE,RCVD_IN_BL_SPAMCOP_NET,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of geniusfox@gmail.com designates 64.233.182.186 as permitted sender) Received: from [64.233.182.186] (HELO nf-out-0910.google.com) (64.233.182.186) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 May 2006 06:54:46 -0700 Received: by nf-out-0910.google.com with SMTP id x4so249431nfb for ; Sun, 14 May 2006 06:54:22 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=U4VHj4Dng7EWu+HWXriQBOYDA/Gwtsn8E+6izkhXqFXl//0BkedByH+ZbRb6CP3hhKVf87Yhbf3lEaDXQshu49au6TbTOeIFJIMBswD6924KZqJfAjgP/KN8HbZw7rnvkMEfHRssAlxMnEQ7+AW1DnFukkZ2bhEI7OUCZcTta1U= Received: by 10.48.254.16 with SMTP id b16mr2594716nfi; Sun, 14 May 2006 06:54:22 -0700 (PDT) Received: by 10.49.64.20 with HTTP; Sun, 14 May 2006 06:54:22 -0700 (PDT) Message-ID: Date: Sun, 14 May 2006 21:54:22 +0800 From: "Qiang Zhou" To: "HttpClient User Discussion" Subject: Re: Connection is not open In-Reply-To: <4464A079.3040308@dubioso.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_37292_30068911.1147614862669" References: <4464A079.3040308@dubioso.net> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_37292_30068911.1147614862669 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello: At end of program mean after client.executeMehtod() and getResponseStream() method. Not the realy last line in my whole program. Fo= r example: GetMethod method =3D new GetMethod(http://www.apache.org); Httpclient client =3Dnew Httpclient(); try { client.executeMethod(method); // Read repsone content. ...Follow the redirect When response.statusCode=3D302 } catch(Exception e) { } finally { if(method!=3Dnull) method.releaseConnection(); } 2006/5/12, Roland Weber : > > Hello, > > > When i invoke releaseConnection method at end program. But system > throw > > an java.lang.IllegaStateException: Connection is not open!!! > > Do not release the connection at the end of the program. > Release the connection after each request you execute, > as shown in the tutorial. > > http://jakarta.apache.org/commons/httpclient/tutorial.html > > cheers, > Roland > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: httpclient-user-help@jakarta.apache.org > > ------=_Part_37292_30068911.1147614862669--