Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 7025 invoked from network); 15 Feb 2004 07:53:25 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 15 Feb 2004 07:53:25 -0000 Received: (qmail 50766 invoked by uid 500); 15 Feb 2004 07:52:58 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 50506 invoked by uid 500); 15 Feb 2004 07:52:57 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 50490 invoked from network); 15 Feb 2004 07:52:56 -0000 Received: from unknown (HELO ip6-localhost) (80.133.154.222) by daedalus.apache.org with SMTP; 15 Feb 2004 07:52:56 -0000 Received: from stefan by ip6-localhost with local (Exim 3.35 #1 (Debian)) id 1AsH4H-0007D0-00 for ; Sun, 15 Feb 2004 08:51:57 +0100 Date: Sun, 15 Feb 2004 08:51:57 +0100 To: commons-user@jakarta.apache.org Subject: File Upload via Post Message-ID: <20040215075157.GA27707@library.stefanbachem.de> Reply-To: stefan@stefanbachem.de Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline User-Agent: Mutt/1.3.28i Organisation: Library Dueren From: Stefan Bachem X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hello I want to Upload a File to an Server, for this my Programm has to act as an WWW Browser. First I have to Authentificate myself over a https connection . I do so and get a session cookie . After this I try to call the Upload Site, but then again the Server tells to Authentifcate me. At this Time my only Action about cookies is: client.getState().setCookiePolicy(CookiePolicy.COMPATIBILITY); Do I have to hand out the Session Cookie to the Server manual? The html code of the Upload Site:

 Festplatte nach Datei a.dat durchsuchen

My code for this: File dat_file = new File("a.dat"); MultipartPostMethod post2 = new MultipartPostMethod("http://www.besteauktion.de/offline.php3"); Header post_header1 = new Header("send","1"); Header post_header2 = new Header("action","batch"); Header post_header3 = new Header("MAX_FILE_SIZE","650000000"); post2.addRequestHeader(post_header1); post2.addRequestHeader(post_header2); post2.addRequestHeader(post_header3); post2.addParameter("dat_file",dat_file); statusCode = client.executeMethod(post2); ciao Stefan:wq --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org