commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Cooper <mfncoo...@gmail.com>
Subject Re: DiskFileUpload why does parseRequest returns 0 items second time
Date Sun, 21 Nov 2004 06:17:26 GMT
On Mon, 15 Nov 2004 11:13:46 +0100, Morten Andersen <mortena@mip.sdu.dk> wrote:
> I find it strange (and annoying) that DiskFileUpload returns zero items the
> second time it is called on a request... Why is that?

If you're talking about calling FileUpload.parseRequest() more than
once on the same request, the simple answer is that an input stream -
such as that provided by the servlet container to the servlet - can
only be consumed once. The first call will consume the stream, so
there's nothing left to process on a second call.

--
Martin Cooper


> 
> Morten Andersen
> Master of applied mathematics and computer science
> Associate professor
> 
> The Maersk Institute of Production technology at Southern Danish University
> www.mip.sdu.dk
> Campusvej 55
> DK-5230 Odense M
> Denmark
> +45 65 50 36 54
> +45 61 71 11 03
> Jabber id: hat@jabber.dk
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message