commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Cooper <>
Subject Re: Use FileUpload in Struts framework
Date Fri, 23 Jan 2004 04:10:42 GMT
On Thu, 22 Jan 2004, CHOY, ALAN wrote:

> Reference:
> I've found the reference above and found out the same thing by testing
> that FileUpload didn't reallly work well with Struts, because the
> HttpRequest input stream had already been exhausted by Struts, and
> FileUpload would return a List of zero size after parsing the
> HttpRequest.

Struts already handles multipart requests, so you should not be trying to
do that also, within a Struts application. That's when you'll find that
the input stream has already been consumed (by Struts).

> I'm just wondering if anyone has any get around for this.  I am using
> Struts 1.0.2, and I'm wondering if Struts 1.1 will do the trick and make
> it work.

If you're using Struts 1.0.2, and you need to do file upload, move to
Struts 1.1 NOW. Seriously. There were a lot of bugs in the Struts 1.0.2
file upload handling, and the entire implementation was replaced in 1.1,
using Commons FileUpload as the core.

Martin Cooper

> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message