tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: Tomcat 5.5 creates 0 byte files
Date Fri, 02 Jul 2010 09:00:55 GMT
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


Mime
View raw message