unpredictable FileNotFoundException in upload page
posted 13 years ago
I have several JSPs that perform file uploads, and on at least one of them, there's a weird FileNotFoundException that appears only once in a blue moon (I've gotten feedback from users about it occurring elsewhere on occasion). Any ideas why some pretty straightforward code would have such aberrant behavior? I'm not saying I'm above mistakes, but this morning when it happened to me, I just moved the file I was trying to upload off my Win XP desktop to a subfolder and it then worked fine! The HTML form in the JSP uses a multipart encoding on the input and all that jazz...anybody ever seen this before?
The only similar problem I had with file uploads was when the upload was timed out. I was using O'Reillys cos upload code. A complete guess may be that poor net performance could occasionally cause the upload to be aborted, and if you are hiding the exception then looking for the file, it won't be found. Dave