jQuery in Action, 3rd edition
The moose likes JSP and the fly likes FileUpload exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply locked New topic

FileUpload exception

ashwini hikulkarni

Joined: Jun 16, 2008
Posts: 25
Hi All
I am trying to upload the file of 1kb to 250MB.
I had developed 2 applications
1>In Struts framework (one application)
2> and using servlets and JSP (second application)

I am using second application (using servlets and JSP )
when i am trying to upload locally on my machine it is working very fine and able to upload as much as i can
so for testing i have to upload MAX till 250MB(because it is client requirement)

All these experiments are on the development server and External IP (using internet)
In my application i am splitting the file say example: I am tring to upload 100Mb of file
step 1> on the server side i am splitting the file of 100Mb in to 1Mb and saving in the Temporary folder
step 2> I am joining the splitted files and then again joining to the orignal file (at the time of upload ) to the destination location
step 3 > Deleting the temporay folder after the joining is done

So These are the results on Development Server (L.A.N) local area network
For --->>13Mb -------->>(Time Taken) 3 minutes
For --->>25Mb -------->>(Time Taken) 6 minutes
For --->>56Mb -------->>(Time Taken) 11 minutes
For --->>100Mb -------->>(Time Taken) 18 minutes
For --->>150Mb -------->>(Time Taken) 30 minutes
For --->>250Mb -------->>(Time Taken) 58 minutes


These are the results on External IP (through internet)
For --->>20Mb -------->>(Time Taken) 5 minutes
For --->>56Mb -------->>(Time Taken) 11 minutes
For --->>78Mb -------->>(Time Taken) 20 minutes

after that if i am tring to upload more than this i am unable to upload
and getting this exception at the server LOG

1>org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly

2>org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. Connection reset

Can any one help me how to make this programm efficient and error free
i cannot use FTP because i have to create a port which is not permitted by the client
can any one help me out with the execellent solution
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63838

Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place. Please read this for more information.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link: http://aspose.com/file-tools
subject: FileUpload exception
It's not a secret anymore!