This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Error deleting file in servlet code after Internet Explorer download error
Tom Katz
Ranch Hand
Joined: Aug 19, 2002
Posts: 169
posted
0
Internet Explorer cannot download %FILENAME% from localhost. The data area passed to a system call is too small.
I get the above error when attempting to download a large file (412MB). Running Jetty 6.1.5.
The real problem is that after getting this error, the code that deletes the temp file is failing. Just a File.delete call, but it works in cases where the file does download. If I try manually deleting the file, I get errors, so I think that's reason to suspect that Internet Explorer may still be accessing the file somehow.
Anyone seen this particular error code when downloading the file?
Also, any ideas on other ways to delete the file in this instance.
thanks, Tom
Tom Katz
Ranch Hand
Joined: Aug 19, 2002
Posts: 169
posted
0
This turned out to be an issue in the file download servlet that was writing to the response stream. It was creating a byte[] that was too large, and generating an OutOfMemoryError.
Once I changed this code to write to the stream in smaller chunks, things work fine.