I did a quick code review and there's nothing obvious amiss. Does the
code invoked by your Workflow interceptor have special error key
handling? The empty file code does use the more generic error key:
struts.messages.upload.error.IllegalArgumentException.

On Sat, 4 Oct 2025 at 19:56, Greg Huber <[email protected]> wrote:
>
> It is not really a custom stack, it uses the workflow interceptor (to
> call validate())
>
> <interceptor-ref name="workflow">
>                      <param
> name="excludeMethods">execute,cancel*,previous</param>
>   </interceptor-ref>
>
> There is something thing different to the logic used for the zero file
> size check compared with the max file size check, where I don't get two
> error messages.  These should use the same logic.
>
> On 04/10/2025 09:54, Lukasz Lenart wrote:
> > I tested the empty file upload behaviour using the example app
> > https://github.com/apache/struts-examples/tree/main/file-upload
> > It uses single <s:actionerror/> tag and based on struts-default
> > package, and I get single error message:
> >
> >> File zero.txt for field upload is empty (0 bytes). Empty file uploads are 
> >> not allowed.
> > I assume you have used a custom interceptor stack (as you have
> > mentioned early) and that was the cause.
> >
> >
> > Cheers
> > Ɓukasz
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail:[email protected]
> > For additional commands, e-mail:[email protected]
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to