FileUploadException

Hi,

I am using Struts to upload the file. Well, in the FormBean, I received it as FormFile which is correct. Everything works fine in my local machine. But when I tested it using SSL and Apache, it gives me the FileUploadException. This exception is intermittent and happened only if you do not specify anything in your <input type="file">.

This is the error stack trace.

org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. Read timed out
        at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:429)
        at com.bea.wlw.netui.pageflow.upload.PageFlowMultipartRequestHandler.handleRequest(PageFlowMultipartRequestHandler.java:263)

And this is how I validate the form bean.

if (uploadFile != null && uploadFile.getFileSize() > 0) {
    // my business lgoic
}

David
LVL 16
suprapto45Asked:
Who is Participating?
 
Mayank SConnect With a Mentor Associate Director - Product EngineeringCommented:
http://mail-archives.apache.org/mod_mbox/jakarta-commons-user/200309.mbox/%3CD5EF97BA1799084E857AA9E26CCE319701F03B5D@dasmthefl800.amedd.army.mil%3E looks like the same problem as yours - it says that it happened with usage of SSL on IE 5 but not with IE 6 ;-)
0
 
suprapto45Author Commented:
For more info,

The validation is successfully executed and I do not know how this thing happened. Is this SSL or Apache problem?

Thanks
David
0
 
Mayank SAssociate Director - Product EngineeringCommented:
>> Processing of multipart/form-data request failed. Read timed out

Looks like just a problem which can be intermittent and where all you need to do is refresh. Like sometimes you open a web-site and it just doesn't open - what do you do? Refresh, and it opens ;-)
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
suprapto45Author Commented:
thanks mayankeagle,

I will have a look at it.

David
0
 
girionisConnect With a Mentor Commented:
In this link: http://www.tek-tips.com/viewthread.cfm?qid=627123 it is suggested that you set the property disableUploadTimeout  to false.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
I thought that was the default?
0
 
suprapto45Author Commented:
I myself am confused now. Let me check my Apache first. It may not serve the right files.

David
0
 
suprapto45Author Commented:
Nope,

Now it is more interesting....after modifying the JavaScript to modify the way it submits the form, it works better. Now, the problem is intermittent (sometimes only).

Any idea?

David
0
 
suprapto45Author Commented:
Though it does not solve the problem directly, it gives me an idea on what should I do.

Thanks mayankeagle and girionis.

David
0
 
girionisCommented:
:)
0
All Courses

From novice to tech pro — start learning today.