commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guhn Chang" <>
Subject FileUploadException - the request was rejected because it's size is unknown
Date Tue, 05 Jul 2005 15:41:20 GMT
I am using the FileUpload 1.1 library in Weblogic 8.1 SP4, and am trying to 
get uploading to work in portlets.  Whenever I try to parse my multipart 
content, I get an exception with the message "the request was rejected 
because it's size is unknown".

Here are some relevant code snippets.

public void processAction(ActionRequest request, ActionResponse
response) throws PortletException
if (PortletFileUpload.isMultipartContent(request))

DiskFileItemFactory factory = new DiskFileItemFactory();
PortletFileUpload upload = new PortletFileUpload(factory);

List fileItems = upload.parseRequest(request);
FileItem item = (FileItem)fileItems.iterator().next();
File uploadedFile = new File(type + item.getName());
catch (Exception ex)
System.out.println("EXCEPTION: File upload request error:
" + ex.getMessage());


My jsp file contains:

<form action="<portlet:actionURL />" method="post"
<table width="100%" cellspacing="0" cellpadding="3" >
<td> <input type="text" name="title"></td>
<td> <input type="text" name="description"></td>

<td> <input type="file" name="upfile" ></td>

<input type="submit" name="doUpload" value="upload"/>
<input type="submit" name="cancel" value="cancel"/>

I have tried this with size set and unset in  the "<input type="file"" 

I have tried several forums already and gotten no responses.  Any 
direction/help would be appreciated.

-Guhn Chang

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

View raw message