commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From poc0...@aim.com
Subject Re: FileUploadBase.UnknownSizeException
Date Wed, 11 Jan 2006 16:07:09 GMT
 
i printed out request length and it's -1 (called the getContentLength method on the ActionRequest
object)
 
as u probably guessed, my app does no control the request object, simply uses it when passed
in when the portal calls the processAction() method in my portlet
 
not sure what the portal does with the request object beforehand
 
 
-----Original Message-----
From: Martin Cooper <martinc@apache.org>
To: Jakarta Commons Users List <commons-user@jakarta.apache.org>
Sent: Tue, 10 Jan 2006 20:12:28 -0800
Subject: Re: FileUploadBase.UnknownSizeException


On 1/10/06, poc0456@aim.com <poc0456@aim.com> wrote:
>
> hello
>
> i'm working the latest version 1.1 of fileupload but i'm getting the
> following error when i run my app (a java portlet) in bea weblogic 8.1,
> sp5:
>
> org.apache.commons.fileupload.FileUploadBase$UnknownSizeException: the
> request was rejected because it's size is unknown
>
> is fileupload not working right?


That depends. If the request does not include a content length header, then
FileUpload is working correctly. It cannot handle multipart requests unless
the content length is specified. There is an existing enhancement request to
add support for this case. However, this seldom comes up with browser
clients.

If the request _does_ include a content length header, then there might be
an issue. You should also ensure that the request has not already been
parsed by some other code before it reaches your code.

--
Martin Cooper


-- poc
> ________________________________________________________________________
> Check Out the new free AIM(R) Mail -- 2 GB of storage and industry-leading
> spam and email virus protection.
>
>
________________________________________________________________________
Check Out the new free AIM(R) Mail -- 2 GB of storage and industry-leading spam and email
virus protection.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message