You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2005/09/16 17:26:27 UTC

DO NOT REPLY [Bug 36687] New: - Struts not populating form values when maxFileSize exceeded during file upload

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36687>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36687

           Summary: Struts not populating form values when maxFileSize
                    exceeded during file upload
           Product: Struts
           Version: 1.2.7
          Platform: All
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Controller
        AssignedTo: dev@struts.apache.org
        ReportedBy: lmg@yahoo.com


During a file upload, RequestUtils.java detects when the maximum file size is
exceeded and terminates form population when this condition is present. Since
file upload processing occurs before populating other non-file form elements the
resulting form does not contain data for non-file form elements. This causes
problems when these other form elements are assigned validators. After calling
processPopulate(), RequestProcessor.java calls processValidate() to validate the
form and finds null values for the non-file form elements. In my case I have the
"required" validator assigned to a number of form elements which fails because
the form elements have not been populated even though they are present in the
request. The end user is presented with the "required" error message masking the
true problem of the max file size being exceeded.

I am aware of the MultipartRequesthandler.ATTRIBUTE_MAX_LENGTH_EXCEEDED
attribute that is added to the request when the max file size has been exceeded
but because validation fails the action is never executed and there is no
opportunity to correct the unwanted behavior described above.

I suggest allowing the form elements to be populated when the max file size has
been exceeded so that form validation can proceed as normal.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org