« Return to Thread: Struts 2 file upload size validation

Re: Struts 2 file upload size validation

by Laurie Harper :: Rate this Message:

Reply to Author | View in Thread

Rubbinio wrote:

> Hi,
>
> we are trying to use file upload in Struts 2 and run into the following
> problem.
>
> We have a form with multiple fields among which one is a file input field.
> The user must complete the form and then select a file to upload. If the
> file size is larger than what we specify in the struts.properties the
> FileUploadInterceptor validates and adds the error. Up to here everything is
> fine however upon having the error passed to the action we want to return to
> the same form, display the error and have the rest of fields populated with
> the values the user has inputed (except the file field).
>
> The problem is that when we get in the action (validate method) none of the
> request parameters (form values) are populated. Everything is empty.
>
> The question is why is this happening and how can we have the form values
> populated in the action so that we can display the page correctly ?

What interceptor stack are you using? Does everything work as expected
if the file size does not exceed the size you specify?

L.


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

 « Return to Thread: Struts 2 file upload size validation