« Return to Thread: How is the max file size controlled for file uploads in Struts 1.3.8?

Re: How is the max file size controlled for file uploads in Struts 1.3.8?

by Paul Benedict-2 :: Rate this Message:

Reply to Author | View in Thread

Frank,

Do you prefer an exception? What would you do with it?

Paul

On Thu, Jul 9, 2009 at 8:17 AM, Frank Russo <Frank.Russo@...> wrote:

> org.apache.struts.util.RequestUtils has the following at lines 408-415:
>
>                Boolean maxLengthExceeded =
>                    (Boolean) request.getAttribute(MultipartRequestHandler.ATTRIBUTE_MAX_LENGTH_EXCEEDED);
>
>                if ((maxLengthExceeded != null)
>                    && (maxLengthExceeded.booleanValue())) {
>                    ((ActionForm) bean).setMultipartRequestHandler(multipartHandler);
>                    return;
>                }
>
> Why would it just return? Shouldn't it throw some kind of exception? When my action is called, I have no way to know that the max file size was exceeded, and my request params are empty, so the correct DispatchAction method isn't being called.
>
> Has anyone else seen this behavior?
>
> ----------------------------------------------------------------------------------------------------------------
> Frank Russo
> Developer ▪ Financial Services Division
> SAS® … THE POWER TO KNOW®
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...

 « Return to Thread: How is the max file size controlled for file uploads in Struts 1.3.8?