From commons-user-returnhinesstephen@example.com Wed Jun 01 16:59:56 2005 Return-Path: <commons-user-returnhinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 41393 invoked from network); 1 Jun 2005 16:59:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Jun 2005 16:59:55 -0000 Received: (qmail 67590 invoked by uid 500); 1 Jun 2005 16:59:46 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 67570 invoked by uid 500); 1 Jun 2005 16:59:46 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:hinesstephen@example.com> List-Help: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: "Jakarta Commons Users List" <commons-user.jakarta.apache.org> Reply-To: "Jakarta Commons Users List" <hinesstephen@example.com> Delivered-To: mailing list hinesstephen@example.com Received: (qmail 67529 invoked by uid 99); 1 Jun 2005 16:59:44 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from sophia.inria.fr (HELO sophia.inria.fr) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 01 Jun 2005 09:59:43 -0700 Received: from localhost (localhost [83.161.120.155]) by sophia.inria.fr (8.12.11/8.12.9) with ESMTP id j51GxQNa025288 for <hinesstephen@example.com>; Wed, 1 Jun 2005 18:59:26 +0200 Received: from [83.161.120.155] (dahu.inria.fr [83.161.120.155]) by sophia.inria.fr (8.12.11/8.12.9) with ESMTP id j51GxFjv025255 for <hinesstephen@example.com>; Wed, 1 Jun 2005 18:59:15 +0200 Message-ID: <hinesstephen@example.com> Date: Wed, 01 Jun 2005 18:59:15 +0200 From: Philippe Poulard <hinesstephen@example.com> User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041220 X-Accept-Language: fr-FR,en MIME-Version: 1.0 To: Jakarta Commons Users List <hinesstephen@example.com> Subject: Re: [VFS] VFS.getManager().getFilesCache() - exists() vs findFiles() References: <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> In-Reply-To: <hinesstephen@example.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.6 (sophia.inria.fr [83.161.120.155]); Wed, 01 Jun 2005 18:59:15 +0200 (MEST) X-Virus-Scanned: by hinesstephen@example.com X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N hi, I have just resolved a problem due to caching and deletion : -delete() -close() <- I found this tip in this thread :) I understand that close() is needed to flush the cache, but I found a problem in this sequence : -delete() -copy() -set-attributes() I catch an exception telling me that the file didn't exist ; but it does exist : i just have create it !!! so, after creation, the cache seems not be updated the solution rigth now is : -delete() -close() -copy() -set-attributes() but it is not fair Mario Ivankovits wrote: > Andy Lewis wrote: > >> First, what about adding a stat() method on FileObject, something akin >> > > I dont want to introduce a new public api function. > > Especially if I think that I have to call stat() immediatly after > resolveFile() every time as I am not interested in performance but more > in correct results. > My current code is flooded with nasty close() (instead of stat()) as > this is the method which is intended to to the same as stat(). > > Sure, I know, it closes all streams (opened by the calling thread), but > this is not a problem in this context, moreover it is wanted to behave so. > This forces a clean state on the remote side. > > I admit, what we can do is to force this during findFiles() ... will see. > >> While it might not solve every case, for example, if you resolve a >> cached deleted file from a URL using FileSystemManager.resolveFile() - >> how would that show up? (haven't tested it) >> > > No server round trip here, so this file is still marked as "deleted". > > > I will have a look in refactoring FileObject to use no internal caching > and allow to decorate it with a CacheFileObject with behaves more or > less like we see it today. > And then, we could have such a CacheFileObject.stat() method. > > It should be configureable on FileSystemManager and maybe on FileSystem > level. > And the default might be to use the FileObject without caching. > > --- > Mario > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: hinesstephen@example.com > For additional commands, e-mail: hinesstephen@example.com > -- Cordialement, /// (. .) -----ooO--(_)--Ooo----- | Philippe Poulard | ----------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: hinesstephen@example.com For additional commands, e-mail: hinesstephen@example.com From commons-user-returnhinesstephen@example.com Wed Jun 01 17:37:53 2005 Return-Path: <commons-user-returnhinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 56012 invoked from network); 1 Jun 2005 17:37:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Jun 2005 17:37:53 -0000 Received: (qmail 54595 invoked by uid 500); 1 Jun 2005 17:37:46 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 54582 invoked by uid 500); 1 Jun 2005 17:37:46 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:hinesstephen@example.com> List-Help: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: "Jakarta Commons Users List" <commons-user.jakarta.apache.org> Reply-To: "Jakarta Commons Users List" <hinesstephen@example.com> Delivered-To: mailing list hinesstephen@example.com Received: (qmail 54569 invoked by uid 99); 1 Jun 2005 17:37:46 -0000 X-ASF-Spam-Status: No, hits=1.0 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_30_40,HTML_MESSAGE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of hinesstephen@example.com designates 83.161.120.155 as permitted sender) Received: from rproxy.gmail.com (HELO rproxy.gmail.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 01 Jun 2005 10:37:41 -0700 Received: by rproxy.gmail.com with SMTP id c51so770164rne for <hinesstephen@example.com>; Wed, 01 Jun 2005 10:37:32 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:references; b=uaLwnmGnzApOGqIyWQy3379ck86btEmIOhD7hAb+bQ8e2MNpjAmrxJ+06xzFAg/sG9OjFjq4i3p29i9psmDusKNGmDiilzllibc4cY2VlP0mefKcd1nl71Z0aDjWbM+0605B3dXfIJxeY6GAAU1/t0JLwqpb7RIPS+sJCWuJCaE= Received: by 83.161.120.155 with SMTP id q80mr71686cwc; Wed, 01 Jun 2005 10:37:31 -0700 (PDT) Received: by 83.161.120.155 with HTTP; Wed, 1 Jun 2005 10:37:31 -0700 (PDT) Message-ID: <hinesstephen@example.com> Date: Wed, 1 Jun 2005 13:37:31 -0400 From: Mark Lybarger <hinesstephen@example.com> Reply-To: Mark Lybarger <hinesstephen@example.com> To: Jakarta Commons Users List <hinesstephen@example.com> Subject: Re: CSV parsing/writing? In-Reply-To: <hinesstephen@example.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_256_23563865.1117647451621" References: <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_256_23563865.1117647451621 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline just stumbled across this thread on CSV processing from java. i haven't=20 really done much CSV processing myself actually, but i have used the jmeter= =20 package from apache, and i believe it uses CSV files for reading in=20 parameters to use in the tests. they might have something that can be=20 genericized or some such there. On 5/31/05, Don Seiler <hinesstephen@example.com> wrote: >=20 > On 22:31 Fri 27 May , Henri Yandell wrote: > > I've got to improve my google hit on csv parsing it seems. > > > > http://www.osjava.org/genjava/multiproject/gj-csv/ > > > > Completely available for Commons if so desired, in fact 'genjava' is > > where I put things I'd like to add to Commons but haven't seen any > > desire for. >=20 > Do you have any example .java files? If this works out, I can just have > my csv4j project removed from SF.net <http://SF.net>. I've only committed= =20 > project > helper files, no actual code yet. >=20 > -- > Don Seiler > hinesstephen@example.com >=20 > Public Key: http://pgp.mit.edu:11371/pks/lookup?op=3Dget&search=3D0xFC87F= 041 > Fingerprint: 0B56 50D5 E91E 4D4C 83B7 207C 76AC 5DA2 FC87 F041 >=20 >=20 > ------=_Part_256_23563865.1117647451621-- From commons-user-returnhinesstephen@example.com Wed Jun 01 17:50:33 2005 Return-Path: <commons-user-returnhinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 62950 invoked from network); 1 Jun 2005 17:50:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Jun 2005 17:50:31 -0000 Received: (qmail 95022 invoked by uid 500); 1 Jun 2005 17:50:24 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 95006 invoked by uid 500); 1 Jun 2005 17:50:24 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:hinesstephen@example.com> List-Help: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: "Jakarta Commons Users List" <commons-user.jakarta.apache.org> Reply-To: "Jakarta Commons Users List" <hinesstephen@example.com> Delivered-To: mailing list hinesstephen@example.com Received: (qmail 94986 invoked by uid 99); 1 Jun 2005 17:50:24 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of hinesstephen@example.com designates 83.161.120.155 as permitted sender) Received: from ops004.ops.co.at (HELO smtp.ops.co.at) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 01 Jun 2005 10:50:21 -0700 Received: by smtp.ops.co.at (Postfix, from userid 65534) id 0C57E23C0AC; Wed, 1 Jun 2005 19:50:01 +0200 (CEST) Received: from [83.161.120.155] (mgate.int.ops.co.at [83.161.120.155]) by smtp.ops.co.at (Postfix) with ESMTP id 39B7023C0AB for <hinesstephen@example.com>; Wed, 1 Jun 2005 19:50:00 +0200 (CEST) Message-ID: <hinesstephen@example.com> Date: Wed, 01 Jun 2005 19:50:00 +0200 From: Mario Ivankovits <hinesstephen@example.com> User-Agent: Mozilla Thunderbird 1.0 (X11/20041207) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jakarta Commons Users List <hinesstephen@example.com> Subject: Re: [VFS] VFS.getManager().getFilesCache() - exists() vs findFiles() References: <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> In-Reply-To: <hinesstephen@example.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on smtp.ops.co.at X-Spam-Level: X-Spam-Status: No, hits=-6.8 required=7.0 tests=AM_BODY_PLING,AWL,BAYES_00, RATWR10_MESSID,SARE_TOCC_USER autolearn=no version=2.64 X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Philippe Poulard wrote: > -delete() > -copy() > -set-attributes() > > I catch an exception telling me that the file didn't exist ; but it > does exist : i just have create it !!! so, after creation, the cache > seems not be updated Could you please pack these steps in a runnable java code. With some asserts which show the problem. I will have a look at it then. Thanks! Mario --------------------------------------------------------------------- To unsubscribe, e-mail: hinesstephen@example.com For additional commands, e-mail: hinesstephen@example.com From commons-user-returnhinesstephen@example.com Wed Jun 01 23:25:47 2005 Return-Path: <commons-user-returnhinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 16935 invoked from network); 1 Jun 2005 23:25:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Jun 2005 23:25:47 -0000 Received: (qmail 54993 invoked by uid 500); 1 Jun 2005 23:25:41 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 54958 invoked by uid 500); 1 Jun 2005 23:25:40 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:hinesstephen@example.com> List-Help: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: "Jakarta Commons Users List" <commons-user.jakarta.apache.org> Reply-To: "Jakarta Commons Users List" <hinesstephen@example.com> Delivered-To: mailing list hinesstephen@example.com Received: (qmail 54934 invoked by uid 99); 1 Jun 2005 23:25:40 -0000 X-ASF-Spam-Status: No, hits=4.0 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,FORGED_YAHOO_RCVD,HTML_50_60,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from web31504.mail.mud.yahoo.com (HELO web31504.mail.mud.yahoo.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 01 Jun 2005 16:25:38 -0700 Received: (qmail 21621 invoked by uid 60001); 1 Jun 2005 23:25:36 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=ZcjBpgk5UyIdDt65gF0cDzcgCkFjGWbvbUUyR6sJDGQnlAEb1wxxIaCNLhODbzqBRbGuP3Luia1FceQYMPIfavK3Ls002TSTOvSBpPIKggAoqR4r7BKM5DEjAqsln6iN5HbH/xCp3giFaOFt3MyD3N4GCYXXzLmTwtfIKdHOtPU= ; Message-ID: <hinesstephen@example.com> Received: from [83.161.120.155] by web31504.mail.mud.yahoo.com via HTTP; Wed, 01 Jun 2005 16:25:36 PDT Date: Wed, 1 Jun 2005 16:25:36 -0700 (PDT) From: manco <hinesstephen@example.com> Subject: [VFS] FileObject moveTo() - when destination exists, gives wrong error msg To: hinesstephen@example.com MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1314442123-1117668336=:21599" Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --0-1314442123-1117668336=:21599 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi, I am doing some testing on my file transfer lib which is built on top of VFS. Specifically I am testing the mv/moveTo, and I noticed if the Destination file already exists i get and error, as expected, but the error is wrong: Message: Destination "file://C:/srcfile.ext" already existent. The problem is it lists the Source filename, it should list the destination filename. // code adapted from Shell.java private void mv(FileObject srcFo, FileObject dstFo) throws Exception { if (dstFo.exists() && dstFo.getType() == FileType.FOLDER) { dstFo = dstFo.resolveFile(srcFo.getName().getBaseName()); } if(onMoveOverwrite && dstFo.exists()) { dstFo.delete(); } try { srcFo.moveTo(dstFo); } catch (Exception ex) { logger.error("mv: src: " + srcFo.getName() + " dest: " + dstFo.getName() + " msg: " + ex.getMessage()); throw (ex); } } // endof mv actual erorr output: [main] ERROR - mv: src: file://C:/TEMP/Remote/IN/restore.verify dest: file://C:/TEMP/local/APPEND/restore.verify msg: Destination "file://C:/TEMP/Remote/IN/restore.verify" already existent. Thanks, Manco --------------------------------- Discover Yahoo! Get on-the-go sports scores, stock quotes, news & more. Check it out! --0-1314442123-1117668336=:21599-- From commons-user-returnhinesstephen@example.com Wed Jun 01 23:57:54 2005 Return-Path: <commons-user-returnhinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 25375 invoked from network); 1 Jun 2005 23:57:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Jun 2005 23:57:54 -0000 Received: (qmail 6698 invoked by uid 500); 1 Jun 2005 23:57:49 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 6651 invoked by uid 500); 1 Jun 2005 23:57:48 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:hinesstephen@example.com> List-Help: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: "Jakarta Commons Users List" <commons-user.jakarta.apache.org> Reply-To: "Jakarta Commons Users List" <hinesstephen@example.com> Delivered-To: mailing list hinesstephen@example.com Received: (qmail 6636 invoked by uid 99); 1 Jun 2005 23:57:48 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of hinesstephen@example.com designates 83.161.120.155 as permitted sender) Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 01 Jun 2005 16:57:46 -0700 Received: by wproxy.gmail.com with SMTP id 58so65709wri for <hinesstephen@example.com>; Wed, 01 Jun 2005 16:57:44 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=i5+cef4l2voQ1Y4ZOYcMBnM8eekNTIRI2pGesfS7XQEZyeNN3VWeohc+SnjEry2+iBQtTILbCB2Czu9XKJiOf2qr52UNI/z3wyKjoJsibViXNMA/sifc6hLFsHL4Y6DF8GKsyKDprzRMsGZ7EMOl0+N1oNF5A+hr3yXDpWrArPE= Received: by 83.161.120.155 with SMTP id 68mr204429wrc; Wed, 01 Jun 2005 16:57:16 -0700 (PDT) Received: by 83.161.120.155 with HTTP; Wed, 1 Jun 2005 16:56:16 -0700 (PDT) Message-ID: <hinesstephen@example.com> Date: Thu, 2 Jun 2005 09:56:16 +1000 From: Dion Gillard <hinesstephen@example.com> Reply-To: Dion Gillard <hinesstephen@example.com> To: Jakarta Commons Users List <hinesstephen@example.com> Subject: [vfs] providing smb credentials somewhere other than the URI Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Is it possible to pass username/password to the FileSystemManager or some other object so that the URI doesn't need the username/password combo? e.g. I'd rather not do a=20 FileSystemManager.resolveFile("smb://user:password@host/share/file") and instead do FileSystemManager.resolveFile("smb://host/share/file", ???OPTIONS???) Any ideas? --=20 http://www.multitask.com.au/people/dion/ "You are going to let the fear of poverty govern your life and your reward will be that you will eat, but you will not live." - George Bernard Shaw --------------------------------------------------------------------- To unsubscribe, e-mail: hinesstephen@example.com For additional commands, e-mail: hinesstephen@example.com From commons-user-returnhinesstephen@example.com Wed Jun 01 23:58:10 2005 Return-Path: <commons-user-returnhinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 25565 invoked from network); 1 Jun 2005 23:58:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Jun 2005 23:58:10 -0000 Received: (qmail 8017 invoked by uid 500); 1 Jun 2005 23:58:03 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 7957 invoked by uid 500); 1 Jun 2005 23:58:03 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:hinesstephen@example.com> List-Help: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: "Jakarta Commons Users List" <commons-user.jakarta.apache.org> Reply-To: "Jakarta Commons Users List" <hinesstephen@example.com> Delivered-To: mailing list hinesstephen@example.com Received: (qmail 7940 invoked by uid 99); 1 Jun 2005 23:58:03 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of hinesstephen@example.com designates 83.161.120.155 as permitted sender) Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 01 Jun 2005 16:58:01 -0700 Received: by wproxy.gmail.com with SMTP id 58so65733wri for <hinesstephen@example.com>; Wed, 01 Jun 2005 16:57:57 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Ac8v9P59FL1SILVFL6Fz+KKyYFbMUZC7TP+xcUO97pnKZesOwNrGkeb77cOl1u1/6qEwkatveFgzKt0rqCMyxDhoVpTrmd8P/DMSWFhnkCfoU6Yz7QpAcofE1lpNLQIogAbGJdxMg/WFIlqWZt7kZyNA5ENX5j0fdKRoOCQQI3g= Received: by 83.161.120.155 with SMTP id g13mr190930wrc; Wed, 01 Jun 2005 16:57:23 -0700 (PDT) Received: by 83.161.120.155 with HTTP; Wed, 1 Jun 2005 16:56:16 -0700 (PDT) Message-ID: <hinesstephen@example.com> Date: Thu, 2 Jun 2005 09:56:16 +1000 From: Dion Gillard <hinesstephen@example.com> Reply-To: Dion Gillard <hinesstephen@example.com> To: Jakarta Commons Users List <hinesstephen@example.com> Subject: [vfs] providing smb credentials somewhere other than the URI Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Is it possible to pass username/password to the FileSystemManager or some other object so that the URI doesn't need the username/password combo? e.g. I'd rather not do a=20 FileSystemManager.resolveFile("smb://user:password@host/share/file") and instead do FileSystemManager.resolveFile("smb://host/share/file", ???OPTIONS???) Any ideas? --=20 http://www.multitask.com.au/people/dion/ "You are going to let the fear of poverty govern your life and your reward will be that you will eat, but you will not live." - George Bernard Shaw --------------------------------------------------------------------- To unsubscribe, e-mail: hinesstephen@example.com For additional commands, e-mail: hinesstephen@example.com From commons-user-returnhinesstephen@example.com Wed Jun 01 23:58:40 2005 Return-Path: <commons-user-returnhinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 25747 invoked from network); 1 Jun 2005 23:58:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Jun 2005 23:58:40 -0000 Received: (qmail 9581 invoked by uid 500); 1 Jun 2005 23:58:34 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 9538 invoked by uid 500); 1 Jun 2005 23:58:34 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:hinesstephen@example.com> List-Help: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: "Jakarta Commons Users List" <commons-user.jakarta.apache.org> Reply-To: "Jakarta Commons Users List" <hinesstephen@example.com> Delivered-To: mailing list hinesstephen@example.com Received: (qmail 9523 invoked by uid 99); 1 Jun 2005 23:58:34 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of hinesstephen@example.com designates 83.161.120.155 as permitted sender) Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 01 Jun 2005 16:58:34 -0700 Received: by wproxy.gmail.com with SMTP id 58so65905wri for <hinesstephen@example.com>; Wed, 01 Jun 2005 16:58:32 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=tMIKuGFZGSP9wA4K3RzGvpQVyIni9gfOoffHgQuwMKuC4DNjqWej8CaJV/5Ei1E9RVrIDctPsWwgRa0X5V8xltX3A3qaXB1YOS8avxr4mZV/h6KeQc7aXTOcSQdFQsSQl1Vr+ULyBP4NYJpK5OzWqf8UEEwh6uh+pwUcDTJtBvo= Received: by 83.161.120.155 with SMTP id b12mr197633wre; Wed, 01 Jun 2005 16:58:00 -0700 (PDT) Received: by 83.161.120.155 with HTTP; Wed, 1 Jun 2005 16:56:16 -0700 (PDT) Message-ID: <hinesstephen@example.com> Date: Thu, 2 Jun 2005 09:56:16 +1000 From: Dion Gillard <hinesstephen@example.com> Reply-To: Dion Gillard <hinesstephen@example.com> To: Jakarta Commons Users List <hinesstephen@example.com> Subject: [vfs] providing smb credentials somewhere other than the URI Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Is it possible to pass username/password to the FileSystemManager or some other object so that the URI doesn't need the username/password combo? e.g. I'd rather not do a=20 FileSystemManager.resolveFile("smb://user:password@host/share/file") and instead do FileSystemManager.resolveFile("smb://host/share/file", ???OPTIONS???) Any ideas? --=20 http://www.multitask.com.au/people/dion/ "You are going to let the fear of poverty govern your life and your reward will be that you will eat, but you will not live." - George Bernard Shaw --------------------------------------------------------------------- To unsubscribe, e-mail: hinesstephen@example.com For additional commands, e-mail: hinesstephen@example.com From commons-user-returnhinesstephen@example.com Thu Jun 02 00:13:16 2005 Return-Path: <commons-user-returnhinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 29068 invoked from network); 2 Jun 2005 00:13:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jun 2005 00:13:14 -0000 Received: (qmail 32478 invoked by uid 500); 2 Jun 2005 00:13:09 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 32176 invoked by uid 500); 2 Jun 2005 00:13:08 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:hinesstephen@example.com> List-Help: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: "Jakarta Commons Users List" <commons-user.jakarta.apache.org> Reply-To: "Jakarta Commons Users List" <hinesstephen@example.com> Delivered-To: mailing list hinesstephen@example.com Received: (qmail 32159 invoked by uid 99); 2 Jun 2005 00:13:08 -0000 X-ASF-Spam-Status: No, hits=0.9 required=10.0 tests=DNS_FROM_RFC_ABUSE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of hinesstephen@example.com designates 83.161.120.155 as permitted sender) Received: from rproxy.gmail.com (HELO rproxy.gmail.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 01 Jun 2005 17:13:06 -0700 Received: by rproxy.gmail.com with SMTP id a36so73938rnf for <hinesstephen@example.com>; Wed, 01 Jun 2005 17:13:04 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=o//lETgebQ5zgxeYDshcKaL5xiklcPXyHB4VfO7DakSdLzFKF3BrRxiPsbVudgGOHaJCciPCgR4s/9Fg7rcQA5l+PWZANCJAbWir2+f/4ZnOJXfycrzH31U9pVR8OwC7gigLTOgE5hoi/ccj/aECimB2/+dnKeufeeUWNCPM2EA= Received: by 83.161.120.155 with SMTP id w3mr1550cwb; Wed, 01 Jun 2005 17:13:04 -0700 (PDT) Received: by 83.161.120.155 with HTTP; Wed, 1 Jun 2005 17:13:04 -0700 (PDT) Message-ID: <hinesstephen@example.com> Date: Thu, 2 Jun 2005 01:13:04 +0100 From: sebb <hinesstephen@example.com> Reply-To: sebb <hinesstephen@example.com> To: Jakarta Commons Users List <hinesstephen@example.com> Subject: Re: CSV parsing/writing? In-Reply-To: <hinesstephen@example.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Yes, JMeter does have some CSV functionality, but it is basic - the separator can be changed, but there is no support for quoting elements containing separators. [The workround (if needed) is to choose a separator that is not in the data, which so far has been sufficient for JMeter users - as far as we know. And there are other methods of reading external data.] S. On 6/1/05, Mark Lybarger <hinesstephen@example.com> wrote: > just stumbled across this thread on CSV processing from java. i haven't > really done much CSV processing myself actually, but i have used the jmet= er > package from apache, and i believe it uses CSV files for reading in > parameters to use in the tests. they might have something that can be > genericized or some such there. >=20 >=20 >=20 > On 5/31/05, Don Seiler <hinesstephen@example.com> wrote: > > > > On 22:31 Fri 27 May , Henri Yandell wrote: > > > I've got to improve my google hit on csv parsing it seems. > > > > > > http://www.osjava.org/genjava/multiproject/gj-csv/ > > > > > > Completely available for Commons if so desired, in fact 'genjava' is > > > where I put things I'd like to add to Commons but haven't seen any > > > desire for. > > > > Do you have any example .java files? If this works out, I can just have > > my csv4j project removed from SF.net <http://SF.net>. I've only committ= ed > > project > > helper files, no actual code yet. > > > > -- > > Don Seiler > > hinesstephen@example.com > > > > Public Key: http://pgp.mit.edu:11371/pks/lookup?op=3Dget&search=3D0xFC8= 7F041 > > Fingerprint: 0B56 50D5 E91E 4D4C 83B7 207C 76AC 5DA2 FC87 F041 > > > > > > >=20 > --------------------------------------------------------------------- To unsubscribe, e-mail: hinesstephen@example.com For additional commands, e-mail: hinesstephen@example.com From commons-user-returnhinesstephen@example.com Thu Jun 02 01:21:37 2005 Return-Path: <commons-user-returnhinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 61445 invoked from network); 2 Jun 2005 01:21:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jun 2005 01:21:36 -0000 Received: (qmail 49915 invoked by uid 500); 2 Jun 2005 01:21:31 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 49724 invoked by uid 500); 2 Jun 2005 01:21:29 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:hinesstephen@example.com> List-Help: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: "Jakarta Commons Users List" <commons-user.jakarta.apache.org> Reply-To: "Jakarta Commons Users List" <hinesstephen@example.com> Delivered-To: mailing list hinesstephen@example.com Received: (qmail 49710 invoked by uid 99); 2 Jun 2005 01:21:29 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from mta206-rme.xtra.co.nz (HELO mta206-rme.xtra.co.nz) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 01 Jun 2005 18:21:27 -0700 Received: from mta2-rme.xtra.co.nz ([83.161.120.155]) by mta206-rme.xtra.co.nz with ESMTP id <hinesstephen@example.com>; Thu, 2 Jun 2005 13:21:24 +1200 Received: from [83.161.120.155] ([83.161.120.155]) by mta2-rme.xtra.co.nz with ESMTP id <20050602012124.KIPW8463.mta2-rme.xtra.co.nz@[83.161.120.155]>; Thu, 2 Jun 2005 13:21:24 +1200 Subject: Re: [Digester] setting properties from the app's runtime From: Simon Kitching <hinesstephen@example.com> Reply-To: hinesstephen@example.com To: Timo Boewing <hinesstephen@example.com> Cc: Jakarta Commons Users List <hinesstephen@example.com> In-Reply-To: <1117663043.4456.13.camel@phobos> References: <1116975008.4473.17.camel@phobos> <hinesstephen@example.com> <1117663043.4456.13.camel@phobos> Content-Type: text/plain Date: Thu, 02 Jun 2005 13:22:24 +1200 Message-Id: <hinesstephen@example.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Wed, 2005-06-01 at 23:57 +0200, Timo Boewing wrote: > 1) I need to set the "classname" attribute of the object-create-rule > dynamically. I did this before when my rules were set in my app's Java > code, so that e.g. the "type" param was read from my XML definitions: > > <page id="pg1" type="x.y.QuestionPage"> > [...] > </page> > > ... so that the type attrib is placed into the classname of the > object-create rule. Is this still possible when using the Digester XML > config? You mean you used this? new ObjectCreateRule(digester, "x.y.DefaultPage", "type"); I think you need <object-create-rule pattern=".." classname="x.y.DefaultPage" attrname="type"/> > > > 2) I really am stupid enough not to find a reference documentation for > the DigesterLoader; i.e. what control tags are there and what attribts > are valid for them. Does anyone know where to find it? The best thing to do is to look at the dtd for xmlrules: http://svn.apache.org/repos/asf/jakarta/commons/proper/digester/tags/ DIGESTER_1_6/src/java/org/apache/commons/digester/ xmlrules/digester-rules.dtd Regards, Simon --------------------------------------------------------------------- To unsubscribe, e-mail: hinesstephen@example.com For additional commands, e-mail: hinesstephen@example.com From commons-user-returnhinesstephen@example.com Thu Jun 02 05:03:29 2005 Return-Path: <commons-user-returnhinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 42675 invoked from network); 2 Jun 2005 05:03:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jun 2005 05:03:28 -0000 Received: (qmail 48574 invoked by uid 500); 2 Jun 2005 05:03:21 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 48513 invoked by uid 500); 2 Jun 2005 05:03:21 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:hinesstephen@example.com> List-Help: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: "Jakarta Commons Users List" <commons-user.jakarta.apache.org> Reply-To: "Jakarta Commons Users List" <hinesstephen@example.com> Delivered-To: mailing list hinesstephen@example.com Received: (qmail 70682 invoked by uid 99); 1 Jun 2005 21:57:39 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Subject: Re: [Digester] setting properties from the app's runtime From: Timo Boewing <hinesstephen@example.com> To: hinesstephen@example.com Cc: Jakarta Commons Users List <hinesstephen@example.com> In-Reply-To: <hinesstephen@example.com> References: <1116975008.4473.17.camel@phobos> <hinesstephen@example.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-erjpLLuMjizBlH93bZIm" Date: Wed, 01 Jun 2005 23:57:23 +0200 Message-Id: <1117663043.4456.13.camel@phobos> Mime-Version: 1.0 X-Mailer: Evolution 2.2.2 X-Provags-ID: kundenserver.de hinesstephen@example.com login:d0cee347a1c71b910c279c45cc4a0316 X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --=-erjpLLuMjizBlH93bZIm Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Mon, 2005-05-30 at 14:34 +1200, Simon Kitching wrote: > Hi Timo, Hello Simon, >=20 > Sorry I didn't see your email earlier. Hey, better than no answer at all :-) >=20 > You can use ObjectParamRule to pass arbitrary objects as part of a > CallMethodRule. However CallMethodRule rules actually invoke the target > method when the xml end tag is reached, which might not be what you want > if you *must* have the call made before addSetProperties. >=20 > An alternative is to use FactoryCreateRule rather than ObjectCreateRule > to create your object. You can then provide a custom > ObjectCreationFactory which configures your new instance however it > wants. Yes, that is pretty fine; I found a sample of this posted by your around this time using Google in an mail archive; thank you! >=20 > Or you can write a custom rule, QuestionInitialiserRule, that makes the > necessary call, and add it: > Rule questionInitialiserRule =3D new QuestionInitialiserRule(...); >=20 > digester.addObjectCreate(...); > digester.addRule(..., questionInitialiserRule); > digester.addSetProperties(...); > .... > A custom rule like this should be about 20 lines of code. The bad news is that I "missed that train" by now, because I completely settled over to a DigesterLoader XML config in favour of lean Java code, so that all my rules are now defined in cfg files rather than in my code, thus this option is now obsolete for me :-) However, I am using this opportunity to ask two more questions to you and the list: 1) I need to set the "classname" attribute of the object-create-rule dynamically. I did this before when my rules were set in my app's Java code, so that e.g. the "type" param was read from my XML definitions: <page id=3D"pg1" type=3D"x.y.QuestionPage"> [...] </page> ... so that the type attrib is placed into the classname of the object-create rule. Is this still possible when using the Digester XML config? 2) I really am stupid enough not to find a reference documentation for the DigesterLoader; i.e. what control tags are there and what attribts are valid for them. Does anyone know where to find it? >=20 > Regards, >=20 > Simon >=20 >=20 Thank you for your reply, Simon! --=20 greetings, | /"\=20 | \ / ASCII-Ribbon-Campaign Timo | X Against HTML Mail | / \=20 ---------------------------------------------------------------------- PUBLIC KEY: 52F3311A Timo Boewing <hinesstephen@example.com> 2003/10/30 Fingerprint =3D F743 E0AA A2F0 1B33 F6FA 417B 72BE 740D 52F3 311A --=-erjpLLuMjizBlH93bZIm Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQBCni9Dcr50DVLzMRoRAhkSAKC+cD9jdgy419O1/5ul8IePIR5nQwCgtc2D XuppmfCy9uj+OROu7Dry7u0= =hXJ9 -----END PGP SIGNATURE----- --=-erjpLLuMjizBlH93bZIm-- From commons-user-returnhinesstephen@example.com Thu Jun 02 06:24:46 2005 Return-Path: <commons-user-returnhinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 66039 invoked from network); 2 Jun 2005 06:24:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jun 2005 06:24:45 -0000 Received: (qmail 97025 invoked by uid 500); 2 Jun 2005 06:24:38 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 96982 invoked by uid 500); 2 Jun 2005 06:24:38 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:hinesstephen@example.com> List-Help: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: "Jakarta Commons Users List" <commons-user.jakarta.apache.org> Reply-To: "Jakarta Commons Users List" <hinesstephen@example.com> Delivered-To: mailing list hinesstephen@example.com Received: (qmail 96943 invoked by uid 99); 2 Jun 2005 06:24:37 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of hinesstephen@example.com designates 83.161.120.155 as permitted sender) Received: from ops004.ops.co.at (HELO smtp.ops.co.at) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 01 Jun 2005 23:24:35 -0700 Received: by smtp.ops.co.at (Postfix, from userid 65534) id B98CF23C0AC; Thu, 2 Jun 2005 08:24:21 +0200 (CEST) Received: from [83.161.120.155] (lints1.int.ops.co.at [83.161.120.155]) by smtp.ops.co.at (Postfix) with ESMTP id 4688023C0AB for <hinesstephen@example.com>; Thu, 2 Jun 2005 08:24:19 +0200 (CEST) Message-ID: <hinesstephen@example.com> Date: Thu, 02 Jun 2005 08:24:19 +0200 From: Mario Ivankovits <hinesstephen@example.com> User-Agent: Mozilla Thunderbird 1.0 (X11/20041207) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jakarta Commons Users List <hinesstephen@example.com> Subject: Re: [VFS] FileObject moveTo() - when destination exists, gives wrong error msg References: <hinesstephen@example.com> In-Reply-To: <hinesstephen@example.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on smtp.ops.co.at X-Spam-Level: X-Spam-Status: No, hits=-17.3 required=7.0 tests=AWL,BAYES_00, LOCAL_WHITE_RECV_TS1,RATWR10_MESSID,SARE_TOCC_USER autolearn=ham version=2.64 X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N manco wrote: >The problem is it lists the Source filename, it should list the destination filename. > Should be fixed now! Thanks! Mario --------------------------------------------------------------------- To unsubscribe, e-mail: hinesstephen@example.com For additional commands, e-mail: hinesstephen@example.com From commons-user-returnhinesstephen@example.com Thu Jun 02 06:30:52 2005 Return-Path: <commons-user-returnhinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 67726 invoked from network); 2 Jun 2005 06:30:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jun 2005 06:30:52 -0000 Received: (qmail 10466 invoked by uid 500); 2 Jun 2005 06:30:45 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 10427 invoked by uid 500); 2 Jun 2005 06:30:45 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:hinesstephen@example.com> List-Help: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: "Jakarta Commons Users List" <commons-user.jakarta.apache.org> Reply-To: "Jakarta Commons Users List" <hinesstephen@example.com> Delivered-To: mailing list hinesstephen@example.com Received: (qmail 10414 invoked by uid 99); 2 Jun 2005 06:30:45 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of hinesstephen@example.com designates 83.161.120.155 as permitted sender) Received: from ops004.ops.co.at (HELO smtp.ops.co.at) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 01 Jun 2005 23:30:45 -0700 Received: by smtp.ops.co.at (Postfix, from userid 65534) id 20C5D23C0AC; Thu, 2 Jun 2005 08:30:24 +0200 (CEST) Received: from [83.161.120.155] (lints1.int.ops.co.at [83.161.120.155]) by smtp.ops.co.at (Postfix) with ESMTP id 0D6E423C0AB for <hinesstephen@example.com>; Thu, 2 Jun 2005 08:30:05 +0200 (CEST) Message-ID: <hinesstephen@example.com> Date: Thu, 02 Jun 2005 08:30:04 +0200 From: Mario Ivankovits <hinesstephen@example.com> User-Agent: Mozilla Thunderbird 1.0 (X11/20041207) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jakarta Commons Users List <hinesstephen@example.com> Subject: Re: [vfs] providing smb credentials somewhere other than the URI References: <hinesstephen@example.com> In-Reply-To: <hinesstephen@example.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on smtp.ops.co.at X-Spam-Level: X-Spam-Status: No, hits=-17.3 required=7.0 tests=AWL,BAYES_00, LOCAL_WHITE_RECV_TS1,RATWR10_MESSID,SARE_TOCC_USER autolearn=ham version=2.64 X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi! >Is it possible to pass username/password to the FileSystemManager or >some other object so that the URI doesn't need the username/password >combo? > Currently: No. But I updated the todo list and added this as a feature of release 1.1. After this we should have a uniform way how to pass credentials to the underlaying filesystem without the need to add them to the url. --- Mario --------------------------------------------------------------------- To unsubscribe, e-mail: hinesstephen@example.com For additional commands, e-mail: hinesstephen@example.com From commons-user-returnhinesstephen@example.com Thu Jun 02 08:51:54 2005 Return-Path: <commons-user-returnhinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 31565 invoked from network); 2 Jun 2005 08:51:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jun 2005 08:51:54 -0000 Received: (qmail 92140 invoked by uid 500); 2 Jun 2005 08:51:47 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 92112 invoked by uid 500); 2 Jun 2005 08:51:46 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:hinesstephen@example.com> List-Help: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: "Jakarta Commons Users List" <commons-user.jakarta.apache.org> Reply-To: "Jakarta Commons Users List" <hinesstephen@example.com> Delivered-To: mailing list hinesstephen@example.com Received: (qmail 92099 invoked by uid 99); 2 Jun 2005 08:51:46 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=HTML_50_60,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from smtpout01-04.mesa1.secureserver.net (HELO smtpout01-04.mesa1.secureserver.net) (83.161.120.155) by apache.org (qpsmtpd/0.28) with SMTP; Thu, 02 Jun 2005 01:51:46 -0700 Received: (qmail 11102 invoked from network); 2 Jun 2005 08:51:32 -0000 Received: from unknown (83.161.120.155) by smtpout01-04.mesa1.secureserver.net (83.161.120.155) with ESMTP; 02 Jun 2005 08:51:31 -0000 Message-ID: <04c201c56750$36830d10$6901a8c0@Dakiti> From: "Martin Grogan" <hinesstephen@example.com> To: <hinesstephen@example.com> Subject: [FileUpload] Resizing JPEG before upload Date: Thu, 2 Jun 2005 09:51:03 +0100 Organization: Keizen Software MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_04BF_01C56758.96DF5990" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_NextPart_000_04BF_01C56758.96DF5990 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi all, I'm new to the list and am hoping someone can help with a file upload = problem. I have successfully installed and used FileUpload to write a JPEG to the = server. What I am hoping to do is resize the image before writing it to = the server (create thumbnails). I have been searching the internet for = days, but with no luck. Can anyone help me, or point me in the right direction. Many thanks, Martin Grogan ------=_NextPart_000_04BF_01C56758.96DF5990-- From commons-user-returnhinesstephen@example.com Thu Jun 02 08:53:44 2005 Return-Path: <commons-user-returnhinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 32074 invoked from network); 2 Jun 2005 08:53:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jun 2005 08:53:43 -0000 Received: (qmail 95990 invoked by uid 500); 2 Jun 2005 08:53:36 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 95970 invoked by uid 500); 2 Jun 2005 08:53:36 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:hinesstephen@example.com> List-Help: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: "Jakarta Commons Users List" <commons-user.jakarta.apache.org> Reply-To: "Jakarta Commons Users List" <hinesstephen@example.com> Delivered-To: mailing list hinesstephen@example.com Received: (qmail 95927 invoked by uid 99); 2 Jun 2005 08:53:36 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from ns1.netcetera.ch (HELO netcetera.ch) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 02 Jun 2005 01:53:33 -0700 Received: from fire-05.netcetera.ch (fire-05 [83.161.120.155]) by fusion.netcetera.ch (8.11.7p1+Sun/8.7.3) with ESMTP id j528rIP17520 for <hinesstephen@example.com.>; Thu, 2 Jun 2005 10:53:18 +0200 (MEST) Received: from localhost by fire-05.netcetera.ch (8.11.7p1+Sun) id j528rHD02872; Thu, 2 Jun 2005 10:53:17 +0200 (MEST) Date: Thu, 2 Jun 2005 10:53:17 +0200 (MEST) From: Stefan Rufer <hinesstephen@example.com> X-X-Sender: hinesstephen@example.com To: hinesstephen@example.com Subject: [io][lang] CSV parser contribution Message-ID: <hinesstephen@example.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; FORMAT=flowed Content-ID: <hinesstephen@example.com> X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Following the discussion about CSV parsing/writing on this list Netcetera AG would like to contribute a CSV parser to jakarta. Features: - configurable delimiter (delimiter may appear in complex values) - complex values (including newlines -> multiline values) - unicode escapes - empty line skipping support - comment support - hardcoded record separators (\n or \r\n) According to Simon Kitching, commons-io or commons-lang might be a place for such a simple implementation. If you have any better idea feel free to hand it on inside jakarta. Source and test code can be found here ftp://ftp.netcetera.ch/pub/csvparser.jar It's widely used in our projects and proved to be stable up to today. Please note that this contribution is dedicated to the Apache Software Foundation, thank you for not using it otherwise. cu Stefan ------------------------------------------------------------------------ Stefan Rufer hinesstephen@example.com Netcetera AG, 8040 Zuerich phone +41 1 247 79 92 fax +41 1 247 70 75 --------------------------------------------------------------------- To unsubscribe, e-mail: hinesstephen@example.com For additional commands, e-mail: hinesstephen@example.com From commons-user-returnhinesstephen@example.com Thu Jun 02 09:33:39 2005 Return-Path: <commons-user-returnhinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 53483 invoked from network); 2 Jun 2005 09:33:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jun 2005 09:33:39 -0000 Received: (qmail 78918 invoked by uid 500); 2 Jun 2005 09:33:32 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 78857 invoked by uid 500); 2 Jun 2005 09:33:31 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:hinesstephen@example.com> List-Help: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: "Jakarta Commons Users List" <commons-user.jakarta.apache.org> Reply-To: "Jakarta Commons Users List" <hinesstephen@example.com> Delivered-To: mailing list hinesstephen@example.com Received: (qmail 78797 invoked by uid 99); 2 Jun 2005 09:33:30 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from sophia.inria.fr (HELO sophia.inria.fr) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 02 Jun 2005 02:33:28 -0700 Received: from localhost (localhost [83.161.120.155]) by sophia.inria.fr (8.12.11/8.12.9) with ESMTP id j529XCLf012252 for <hinesstephen@example.com>; Thu, 2 Jun 2005 11:33:12 +0200 Received: from [83.161.120.155] (dahu.inria.fr [83.161.120.155]) by sophia.inria.fr (8.12.11/8.12.9) with ESMTP id j529Wx5s012165 for <hinesstephen@example.com>; Thu, 2 Jun 2005 11:32:59 +0200 Message-ID: <hinesstephen@example.com> Date: Thu, 02 Jun 2005 11:32:59 +0200 From: Philippe Poulard <hinesstephen@example.com> User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041220 X-Accept-Language: fr-FR,en MIME-Version: 1.0 To: Jakarta Commons Users List <hinesstephen@example.com> Subject: Re: [VFS] VFS.getManager().getFilesCache() - exists() vs findFiles() References: <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> In-Reply-To: <hinesstephen@example.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.6 (sophia.inria.fr [83.161.120.155]); Thu, 02 Jun 2005 11:33:00 +0200 (MEST) X-Virus-Scanned: by hinesstephen@example.com X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Mario Ivankovits wrote: > Philippe Poulard wrote: > >> -delete() >> -copy() >> -set-attributes() >> >> I catch an exception telling me that the file didn't exist ; but it >> does exist : i just have create it !!! so, after creation, the cache >> seems not be updated > > Could you please pack these steps in a runnable java code. With some > asserts which show the problem. > I will have a look at it then. > > Thanks! > Mario > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: hinesstephen@example.com > For additional commands, e-mail: hinesstephen@example.com > FileObject target = XFile.getXFile( "xmldb:xyl://user:hinesstephen@example.com/path/to/file.xml" ); target.getContent().setAttribute( "xmldb-resource-type", "XMLResource" ); target.getContent().setAttribute( "cluster", "Raweb2004" ); target.delete(); FileObject src = XFile.getXFile( "file:///path/to/file.xml" ); target.copyFrom( src, Selectors.SELECT_ALL ); this last line throws an exception (see below) Caused by: org.apache.commons.vfs.FileSystemException: Could not get attributes "{1}" because it does not exist. in the implementation of my XMLDBFileObject (returned with the scheme "xmldb"), I have : protected OutputStream doGetOutputStream( boolean append ) throws FileSystemException { return new ByteArrayOutputStream( 1024 ) { public void close() throws IOException { try { super.close(); byte[] content = toByteArray(); Resource resource = getResource(); resource.setContent( content ); resource.getParentCollection().storeResource( resource ); } catch ( XMLDBException xdbe ) { throw new FileSystemException( xdbe ); } } }; } Resource getResource() throws FileSystemException, XMLDBException { boolean isXML = true; Collection coll = DatabaseManager.getCollection( XMLDBFileObject.this.getParent().getName().getURI() ); for ( Iterator it = XMLDBFileObject.this.getContent().getAttributes().entrySet().iterator() ; it.hasNext() ; ) { /* * getAttributes() fails here because the type * is FileType.IMAGINARY : it has been set when * delete() has been called * all the stuff works if i end the doDelete() * with close() * If target.delete() is not called, the type * is not FileType.IMAGINARY and attributes * can be used and it works */ ); Resource resource = coll.createResource( XMLDBFileObject.this.getName().getBaseName(), isXML ? XML_RESOURCE_TYPE : BINARY_RESOURCE_TYPE ); return resource; } Exception in thread "main" org.apache.commons.vfs.FileSystemException: Could not copy "file:///path/to/file.xml" to "xmldb:xyl://user:hinesstephen@example.com/path/to/file.xml". at org.inria.reflex.modules.io.XFile.copyFrom(XFile.java:884) at Test.main(Test.java:122) Caused by: org.apache.commons.vfs.FileSystemException: Could not close the output stream for file "xmldb:xyl://user:hinesstephen@example.com/path/to/file.xml". at org.apache.commons.vfs.provider.DefaultFileContent$FileContentOutputStream.close(DefaultFileContent.java:504) at org.apache.commons.vfs.FileUtil.copyContent(FileUtil.java:106) at org.inria.reflex.modules.io.XFile.copyFrom(XFile.java:879) ... 1 more Caused by: org.apache.commons.vfs.FileSystemException: Could not get attributes "{1}" because it does not exist. at org.apache.commons.vfs.provider.DefaultFileContent.getAttributes(DefaultFileContent.java:172) at org.inria.reflex.modules.io.xmldb.XMLDBFileObject.getResource(XMLDBFileObject.java:251) at org.inria.reflex.modules.io.xmldb.XMLDBFileObject$2.close(XMLDBFileObject.java:217) at java.io.FilterOutputStream.close(FilterOutputStream.java:143) at org.apache.commons.vfs.util.MonitorOutputStream.close(MonitorOutputStream.java:52) at org.apache.commons.vfs.provider.DefaultFileContent$FileContentOutputStream.close(DefaultFileContent.java:500) ... 3 more in fact, as the delete() method cause the problem because it sets the type to FileType.IMAGINARY, we can't rely on the file type when copying a content file, because as the target will have content, it is obvious that its file type must be switched automatically from FileType.IMAGINARY to FileType.FILE (i hope that FOLDERs don't intend to have content ? in this case, there should be something that denotes that hasAttributes() return true) maybe it should be correct in FileUtil : /** * Copies the content from a source file to a destination file. */ public static void copyContent(final FileObject srcFile, final FileObject destFile) throws IOException { // the destfile may be imaginary, so, let's correct this because we are sure it is a file, now, because we are copying content inside destFile.setType( FileType.FILE ); // Create the output stream via getContent(), to pick up the // validation it does final OutputStream outstr = destFile.getContent().getOutputStream(); try { writeContent(srcFile, outstr); } finally { outstr.close(); } } -- Cordialement, /// (. .) -----ooO--(_)--Ooo----- | Philippe Poulard | ----------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: hinesstephen@example.com For additional commands, e-mail: hinesstephen@example.com From commons-user-returnhinesstephen@example.com Thu Jun 02 09:50:26 2005 Return-Path: <commons-user-returnhinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 58865 invoked from network); 2 Jun 2005 09:50:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jun 2005 09:50:25 -0000 Received: (qmail 13819 invoked by uid 500); 2 Jun 2005 09:50:17 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 13808 invoked by uid 500); 2 Jun 2005 09:50:17 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:hinesstephen@example.com> List-Help: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: "Jakarta Commons Users List" <commons-user.jakarta.apache.org> Reply-To: "Jakarta Commons Users List" <hinesstephen@example.com> Delivered-To: mailing list hinesstephen@example.com Received: (qmail 13795 invoked by uid 99); 2 Jun 2005 09:50:17 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO,HTML_60_70,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from gic-bal-bsd-01.genotec.ch (HELO mail.genotec.ch) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 02 Jun 2005 02:50:13 -0700 Received: from ARES (unknown [83.161.120.155]) by mail.genotec.ch (Postfix) with ESMTP id EB8A73CB8B for <hinesstephen@example.com>; Thu, 2 Jun 2005 11:49:55 +0200 (CEST) From: "Frank Fischer" <hinesstephen@example.com> To: <hinesstephen@example.com> Subject: [DBCP] How to set connectionProperties? Date: Thu, 2 Jun 2005 11:53:22 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0006_01C56769.AEBF5950" X-Mailer: Microsoft Office Outlook, Build 11.0.6353 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Thread-Index: AcVnWOlegCoLybgFTO6x0N5DrtMwEg== Message-Id: <hinesstephen@example.com> X-BitDefender-SpamStamp: 1.1.3 044000041111AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ X-BitDefender-Scanner: Clean, Agent: BitDefender POSTFIX 1.6.2 on gmc-smtp-lin-01 X-BitDefender-Spam: score=25 X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_NextPart_000_0006_01C56769.AEBF5950 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi all I'm using the ConnectionPool and it's working fine so far. Only thing i do not know how to do, is to set the connectionProperties (like minIdle and so on). Since i'm using an ApplicationServer nor Datasources, i can not set them using a properties-File but need to know how they can be set directly on the ConnectionPool. Does anyone know how this can be done? Thanks a lot for your support! Kind regards Frank ------=_NextPart_000_0006_01C56769.AEBF5950-- From commons-user-returnhinesstephen@example.com Thu Jun 02 10:00:16 2005 Return-Path: <commons-user-returnhinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 62331 invoked from network); 2 Jun 2005 10:00:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jun 2005 10:00:16 -0000 Received: (qmail 40216 invoked by uid 500); 2 Jun 2005 10:00:08 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 40173 invoked by uid 500); 2 Jun 2005 10:00:08 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:hinesstephen@example.com> List-Help: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: "Jakarta Commons Users List" <commons-user.jakarta.apache.org> Reply-To: "Jakarta Commons Users List" <hinesstephen@example.com> Delivered-To: mailing list hinesstephen@example.com Received: (qmail 40160 invoked by uid 99); 2 Jun 2005 10:00:08 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from ns1.netcetera.ch (HELO netcetera.ch) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 02 Jun 2005 03:00:06 -0700 Received: from fire-05.netcetera.ch (fire-05 [83.161.120.155]) by fusion.netcetera.ch (8.11.7p1+Sun/8.7.3) with ESMTP id j529xsP29777 for <hinesstephen@example.com.>; Thu, 2 Jun 2005 11:59:54 +0200 (MEST) Received: from localhost by fire-05.netcetera.ch (8.11.7p1+Sun) id j529xrc02937; Thu, 2 Jun 2005 11:59:53 +0200 (MEST) Date: Thu, 2 Jun 2005 11:59:53 +0200 (MEST) From: Stefan Rufer <hinesstephen@example.com> X-X-Sender: hinesstephen@example.com To: Jakarta Commons Users List <hinesstephen@example.com> Subject: Re: [FileUpload] Resizing JPEG before upload In-Reply-To: <04c201c56750$36830d10$6901a8c0@Dakiti> Message-ID: <hinesstephen@example.com> References: <04c201c56750$36830d10$6901a8c0@Dakiti> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I don't know if I got you right, but you can not resize the JPEG before uploading. You have to upload the whole JPEG to the server and do the resize there. For this check out Java Advanced Imaging I guess, e.g. http://forum.java.sun.com/thread.jspa?threadID=177124&messageID=554105 as starting point. cu Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: hinesstephen@example.com For additional commands, e-mail: hinesstephen@example.com From commons-user-returnhinesstephen@example.com Thu Jun 02 10:38:33 2005 Return-Path: <commons-user-returnhinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 75973 invoked from network); 2 Jun 2005 10:38:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jun 2005 10:38:32 -0000 Received: (qmail 27164 invoked by uid 500); 2 Jun 2005 10:38:25 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 27094 invoked by uid 500); 2 Jun 2005 10:38:24 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:hinesstephen@example.com> List-Help: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: "Jakarta Commons Users List" <commons-user.jakarta.apache.org> Reply-To: "Jakarta Commons Users List" <hinesstephen@example.com> Delivered-To: mailing list hinesstephen@example.com Received: (qmail 27056 invoked by uid 99); 2 Jun 2005 10:38: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 smtpout01-04.mesa1.secureserver.net (HELO smtpout01-04.mesa1.secureserver.net) (83.161.120.155) by apache.org (qpsmtpd/0.28) with SMTP; Thu, 02 Jun 2005 03:38:20 -0700 Received: (qmail 13239 invoked from network); 2 Jun 2005 10:38:05 -0000 Received: from unknown (83.161.120.155) by smtpout01-04.mesa1.secureserver.net (83.161.120.155) with ESMTP; 02 Jun 2005 10:38:04 -0000 Message-ID: <054a01c5675f$18f17ac0$6901a8c0@Dakiti> From: "Martin Grogan" <hinesstephen@example.com> To: "Jakarta Commons Users List" <hinesstephen@example.com> References: <04c201c56750$36830d10$6901a8c0@Dakiti> <hinesstephen@example.com> Subject: Re: [FileUpload] Resizing JPEG before upload Date: Thu, 2 Jun 2005 11:37:35 +0100 Organization: Keizen Software MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Stefan, Thanks for your quick reply. I have tried to integrate the code on that site, but without much luck. I have the following fragment as an example. I must admint, my knowledge of AWT and SWING are not good. if(contentType.equals("image/pjpeg")) { File uploadedFile = new File("output.jpg"); ImageIcon myImageIcon = new ImageIcon(item.get()); // get byts in file item myImageIcon = resizeImage( myImageIcon, 150, 100); // i need to scale the image to max 150x100 pixels // need now to convert myImageIcon back to a JPEG of size 150x100, but don't know where to start with this. // newitem should be a byte[] ? that has been re-encoded to JPEG? try{ item.write(newitem); } catch(Exception e){out.println("Problem uploading file");} } This is probably all wrong, and not the way to go about things, but I'm coding in the dark on this one. Many thanks, Martin --------------------------------------------------------------------- To unsubscribe, e-mail: hinesstephen@example.com For additional commands, e-mail: hinesstephen@example.com From commons-user-returnhinesstephen@example.com Thu Jun 02 11:12:52 2005 Return-Path: <commons-user-returnhinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 85497 invoked from network); 2 Jun 2005 11:12:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jun 2005 11:12:51 -0000 Received: (qmail 4664 invoked by uid 500); 2 Jun 2005 11:12:43 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 4631 invoked by uid 500); 2 Jun 2005 11:12:42 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:hinesstephen@example.com> List-Help: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: "Jakarta Commons Users List" <commons-user.jakarta.apache.org> Reply-To: "Jakarta Commons Users List" <hinesstephen@example.com> Delivered-To: mailing list hinesstephen@example.com Received: (qmail 4618 invoked by uid 99); 2 Jun 2005 11:12:42 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of hinesstephen@example.com designates 83.161.120.155 as permitted sender) Received: from ops004.ops.co.at (HELO smtp.ops.co.at) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 02 Jun 2005 04:12:39 -0700 Received: by smtp.ops.co.at (Postfix, from userid 65534) id 6FF1623C0B0; Thu, 2 Jun 2005 13:12:26 +0200 (CEST) Received: from [83.161.120.155] (lints1.int.ops.co.at [83.161.120.155]) by smtp.ops.co.at (Postfix) with ESMTP id 4745F23C0AB for <hinesstephen@example.com>; Thu, 2 Jun 2005 13:12:23 +0200 (CEST) Message-ID: <hinesstephen@example.com> Date: Thu, 02 Jun 2005 13:12:22 +0200 From: Mario Ivankovits <hinesstephen@example.com> User-Agent: Mozilla Thunderbird 1.0 (X11/20041207) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jakarta Commons Users List <hinesstephen@example.com> Subject: Re: [VFS] VFS.getManager().getFilesCache() - exists() vs findFiles() References: <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> <hinesstephen@example.com> In-Reply-To: <hinesstephen@example.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on smtp.ops.co.at X-Spam-Level: X-Spam-Status: No, hits=-17.3 required=7.0 tests=AWL,BAYES_00, LOCAL_WHITE_RECV_TS1,RATWR10_MESSID,SARE_TOCC_USER autolearn=ham version=2.64 X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Philippe Poulard wrote: > Resource getResource() throws FileSystemException, XMLDBException { > boolean isXML = true; > Collection coll = DatabaseManager.getCollection( > XMLDBFileObject.this.getParent().getName().getURI() > ); > for ( Iterator it = > XMLDBFileObject.this.getContent().getAttributes().entrySet().iterator() > ; it.hasNext() ; ) { > /* > * getAttributes() fails here because the type > * is FileType.IMAGINARY : it has been set when > * delete() has been called So the problem is that imaginray files are not allowed to have attributes. Why not simply avoid the loop over the attributes if the file is of type IMAGINARY? I also do not fully understandy why it works if you call close() after delete() - during the attach() the file should still be IMAGINARY as it is deleted. Might it be that your FileObject.doGetType() do not correctly report the type of the file? --- Mario --------------------------------------------------------------------- To unsubscribe, e-mail: hinesstephen@example.com For additional commands, e-mail: hinesstephen@example.com From commons-user-returnhinesstephen@example.com Thu Jun 02 12:54:38 2005 Return-Path: <commons-user-returnhinesstephen@example.com> Delivered-To: hinesstephen@example.com Received: (qmail 27422 invoked from network); 2 Jun 2005 12:54:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jun 2005 12:54:38 -0000 Received: (qmail 67030 invoked by uid 500); 2 Jun 2005 12:54:29 -0000 Delivered-To: hinesstephen@example.com Received: (qmail 67009 invoked by uid 500); 2 Jun 2005 12:54:28 -0000 Mailing-List: contact hinesstephen@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:hinesstephen@example.com> List-Help: <mailto:hinesstephen@example.com> List-Post: <mailto:hinesstephen@example.com> List-Id: "Jakarta Commons Users List" <commons-user.jakarta.apache.org> Reply-To: "Jakarta Commons Users List" <hinesstephen@example.com> Delivered-To: mailing list hinesstephen@example.com Received: (qmail 66976 invoked by uid 99); 2 Jun 2005 12:54:28 -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 smtpout02-04.prod.mesa1.secureserver.net (HELO smtpout02-04.prod.mesa1.secureserver.net) (83.161.120.155) by apache.org (qpsmtpd/0.28) with SMTP; Thu, 02 Jun 2005 05:54:26 -0700 Received: (qmail 3495 invoked from network); 2 Jun 2005 12:54:12 -0000 Received: from unknown (83.161.120.155) by smtpout02-04.prod.mesa1.secureserver.net (83.161.120.155) with ESMTP; 02 Jun 2005 12:54:11 -0000 Message-ID: <058801c56772$1cdfaa40$6901a8c0@Dakiti> From: "Martin Grogan" <hinesstephen@example.com> To: "Jakarta Commons Users List" <hinesstephen@example.com> References: <04c201c56750$36830d10$6901a8c0@Dakiti> <hinesstephen@example.com> Subject: Re: [FileUpload] Resizing JPEG before upload Date: Thu, 2 Jun 2005 13:53:43 +0100 Organization: Keizen Software MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Here's the code, for resizing JPEG images after they are uploaded, for anyone that's interested. Only the relevant portions shown, hope it will be of use to some people. All the best, Martin String contentType = item.getContentType(); out.println(contentType); if(contentType.equals("image/pjpeg")) { File uploadedFile = new File("output.jpg"); ImageIcon myImageIcon = new ImageIcon(item.get()); java.awt.Image image = myImageIcon.getImage(); // attempt to code jpeg int thumbWidth=150; int thumbHeight=100; BufferedImage thumbImage = new BufferedImage(thumbWidth, thumbHeight, BufferedImage.TYPE_INT_RGB); java.awt.Graphics2D graphics2D = thumbImage.createGraphics(); graphics2D.setRenderingHint(java.awt.RenderingHints.KEY_INTERPOLATION,java.awt.RenderingHints.VALUE_INTERPOLATION_BILINEAR); graphics2D.drawImage(image, 0, 0, thumbWidth, thumbHeight, null); String newfilename=thisuser+"_"+thistime+".jpg"; BufferedOutputStream outfile = new BufferedOutputStream(new FileOutputStream("c:\\"+newfilename)); JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(outfile); JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(thumbImage); int quality = 100; param.setQuality((float)quality / 100.0f, false); encoder.setJPEGEncodeParam(param); encoder.encode(thumbImage); outfile.close(); } --------------------- ----- Original Message ----- From: "Stefan Rufer" <hinesstephen@example.com> To: "Jakarta Commons Users List" <hinesstephen@example.com> Sent: Thursday, June 02, 2005 10:59 AM Subject: Re: [FileUpload] Resizing JPEG before upload >I don't know if I got you right, but you can not resize the JPEG before >uploading. > > You have to upload the whole JPEG to the server and do the resize there. > For this check out Java Advanced Imaging I guess, e.g. > http://forum.java.sun.com/thread.jspa?threadID=177124&messageID=554105 > as starting point. > > cu > Stefan > > --------------------------------------------------------------------- > To unsubscribe, e-mail: hinesstephen@example.com > For additional commands, e-mail: hinesstephen@example.com > > --------------------------------------------------------------------- To
{'source': 'Apache Software Foundation Public Mail Archives'}