Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 74958 invoked from network); 2 Jul 2010 09:01:39 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Jul 2010 09:01:39 -0000 Received: (qmail 8694 invoked by uid 500); 2 Jul 2010 09:01:36 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 8221 invoked by uid 500); 2 Jul 2010 09:01:32 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 8212 invoked by uid 99); 2 Jul 2010 09:01:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Jul 2010 09:01:31 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aw@ice-sa.com designates 212.85.38.228 as permitted sender) Received: from [212.85.38.228] (HELO tor.combios.es) (212.85.38.228) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Jul 2010 09:01:22 +0000 Received: from [192.168.245.235] (p549EA9B4.dip0.t-ipconnect.de [84.158.169.180]) by tor.combios.es (Postfix) with ESMTPA id 4AD82226244 for ; Fri, 2 Jul 2010 10:59:20 +0200 (CEST) Message-ID: <4C2DAAC7.9010202@ice-sa.com> Date: Fri, 02 Jul 2010 11:00:55 +0200 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= Reply-To: Tomcat Users List User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Tomcat 5.5 creates 0 byte files References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Murat Birben wrote: > Hi all, > > I have a very simple file upload mechanism in java. I just take the file and > save it on the server. I'm testing this simple code with selenium and *when > a timeout occurs in the selenium test *tomcat creates 0 byte files under > tomcat_home/work/Catalina/localhost/uploadServlet/ directory as MultiPart* > files. It creates thousands of files, until there is no disk space left on > device. What may cause this problem? How can I solve this? Is there anyone > has an idea about this? > > My environment is: Ubuntu - 8.04 server, apache tomcat - 5.5.29, sun java > 1.6 > Hi. I am not good enough in those things to evaluate your code, but here are a couple of tips to do what you seem to want to do. Have a look at : - up to Tomcat 5.5, there was an application called DAV available with Tomcat. That is something designed to do just that : allow users to upload/download) files to/from the server using Tomcat. With some caveats, this works together with what Microsoft calls "web folders", and allows Windows workstation users to see folders on the server within their Windows Explorer (like network shares), and copy/move files to/from there. (It also works, and usually better, with other client DAV implementations). - see http://commons.apache.org/fileupload/ (this may even be included in Tomcat by now; I think I heard something about this a while ago) The point is : allowing users to upload files to the server, and allowing them to specify a path on the server, is dangerous and difficult to do right. Better to use something that is already ready and debugged. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org