You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Morten Andersen <mo...@mip.sdu.dk> on 2004/11/15 11:13:46 UTC
DiskFileUpload why does parseRequest returns 0 items second
time
I find it strange (and annoying) that DiskFileUpload returns zero items the
second time it is called on a request... Why is that?
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
Re: DiskFileUpload why does parseRequest returns 0 items second time
Posted by Dakota Jack <cr...@gmail.com>.
What do you mean by "the second time it is called on a request"? Can
you state in concrete terms what you are doing and what the result is?
Jack
On Mon, 15 Nov 2004 11:13:46 +0100, Morten Andersen <mo...@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?
>
> 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
>
>
--
"You can't wake a person who is pretending to be asleep."
~Native Proverb~
"Each man is good in His sight. It is not necessary for eagles to be crows."
~Hunkesni (Sitting Bull), Hunkpapa Sioux~
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: DiskFileUpload why does parseRequest returns 0 items second time
Posted by Martin Cooper <mf...@gmail.com>.
On Mon, 15 Nov 2004 11:13:46 +0100, Morten Andersen <mo...@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