File upload servlet using MultipartRequest - file not created on the server
I am playing with Jason Hunter's MultipartRequest servlet to upload a
file to a server (Tomcat). However, the file is not appearing on the
server. I have added some println statements to FilePart.writeTo(File
fileOrDirectory). Everything appears as I would expect - the filename
and path are correct, and the number of bytes returned by the method
looks fine. But no file appears on the server. Has anyone else
Many thnaks in advance,
Re: File upload servlet using MultipartRequest - file not created on the server
Actually the file does make it to the server, it just wasn't in the
directory I expected, given what parameters I was passing to the
constructor of MultipartRequest. The file is actually placed in the
directory from which the Tomcat server was started. As I am starting
it using the startup script in the bin directory under the server
root, this is the location that "." results in in the code below.
// Here we (rudely) write to the server root and impose 5 Meg limit.
MultipartRequest multi = new MultipartRequest(req, ".", 5 * 1024 *
|All times are GMT. The time now is 03:02 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.