commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Belot Thomas" <>
Subject RE: [FileUpload] Exception during request parsing
Date Fri, 18 Nov 2005 09:13:22 GMT
Ok, thanks for everything Martin.

Best regards 

-----Message d'origine-----
De : []De la part de
Martin Cooper
Envoyé : jeudi 17 novembre 2005 23:09
À : Jakarta Commons Users List
Objet : Re: [FileUpload] Exception during request parsing

On 11/17/05, Belot Thomas <> wrote:
> Thank you for your answers Martin, here's my response :
> >Because that would limit it to JDK 1.4 or later.
> Ok, now I understand why.
> >The most common cause of this is that the request has already been
> consumed,
> >and is therefore no longer available for parsing by FileUpload.
> >Because it didn't open it. Whoever opened it should close it.
> No, FileUpload is the only one accessing request.getInputStream() in my
> code (by the way I didn't knew that one could use the InputStream before
> giving it to file upload without crashing fileUpload.parse).
> That's why I assumed file upload was supposed to close it.

What I mean is that, for Tomcat at least, getInputStream() does not open the
input stream, it simply returns one that was already open. The container
opens it, so the container should be closing it. (And no, you can't do
anything with the input stream before FileUpload parses it.)

Martin Cooper

Best regards
> Thomas
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message