Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 446 invoked from network); 8 Feb 2005 16:24:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 8 Feb 2005 16:24:36 -0000 Received: (qmail 77506 invoked by uid 500); 8 Feb 2005 16:24:26 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 77271 invoked by uid 500); 8 Feb 2005 16:24:25 -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 77179 invoked by uid 99); 8 Feb 2005 16:24:24 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from post5.inre.asu.edu (HELO post5.inre.asu.edu) (129.219.110.120) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 08 Feb 2005 08:24:22 -0800 Received: from conversion.post5.inre.asu.edu by asu.edu (PMDF V6.1-1X6 #30769) id <0IBL00A01PI6QS@asu.edu>; Tue, 08 Feb 2005 09:22:54 -0700 (MST) Received: from smtp.asu.edu (smtp.asu.edu [129.219.110.107]) by asu.edu (PMDF V6.1-1X6 #30769) with ESMTP id <0IBL00A2HPI5LZ@asu.edu>; Tue, 08 Feb 2005 09:22:53 -0700 (MST) Received: from A2000018 (wsmoak.vpia.asu.edu [209.147.173.40]) by smtp.asu.edu (8.12.10/8.12.10/asu_smtp_relay,nullclient,tcp_wrapped) with SMTP id j18GMpMC009245; Tue, 08 Feb 2005 09:22:51 -0700 (MST) Date: Tue, 08 Feb 2005 09:22:52 -0700 From: Wendy Smoak Subject: Re: [httpclient] Sending serialized object from httpclient to servlet. To: commons-user@jakarta.apache.org Cc: Jakarta Commons Developers List Message-id: <00a401c50dfa$7093d9d0$28ad93d1@irm.local> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Mailer: Microsoft Outlook Express 6.00.2800.1437 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7bit X-Priority: 3 X-MSMail-priority: Normal References: X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N From: "Sanjeev Tripathi" > Can any one tell me how send serialized object to > servlet from httpclient. Colin already gave you one option, (base 64 encoding the binary data): http://www.mail-archive.com/commons-dev%40jakarta.apache.org/msg57055.html For general information on base 64 encoding: http://www.google.com/search?q=java+base64+encoding Here's Jakarta Commons Codec, which includes a base 64 encoder: http://jakarta.apache.org/commons/codec/ http://jakarta.apache.org/commons/codec/apidocs/org/apache/commons/codec/binary/Base64.html Without actually trying it, it looks like all you need to do is: byte[] encodedData = Base64.encodeBase64( binaryData ); Then turn the byte[] into a String and POST it to the server as the value of a request parameter. If it's not too big, it should work the same way as sending a big string from a text area. The 'commons-dev' list is usually reserved for questions about the development of the libraries themselves, so I'm replying to commons-user (and copying dev). -- Wendy Smoak --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org