commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brad Cooper <coob...@yahoo.com>
Subject Re: [FileUpload] - Multipart Post Response
Date Tue, 24 Feb 2004 15:33:19 GMT
After looking at the execptions in the
FileUploadBase.java I noticed the InputStream of the
response had not been opened or closed yet. This
caused the response to be "not valid". So I tested by
doing a 

InputStream input = request.getInputStream();
input.close();

right in my exception handler for DiskFileUpload and
all my redirect and dispatcher test cases worked.

Hope this helps someone else or maybe some sort of
response stream validation could be done in the
FileUploadBase Class itself in the future.

Thanks,
Brad

		
--- Brad Cooper <coobr01@yahoo.com> wrote:
> Good day,
>   I'm testing out using the DiskFileUpload class of
> the FileUpload component. I'm trying to redirect the
> user to a common error page incase the get the
> "SizeLimitExceededException" Exception is thrown.
> I'm
> having trouble using a dispatcher to forward the
> user
> to the common error page.
> 
> So I went up to the first lines of my doPost method
> and tried to forward using a dispatcher and it
> wouldn't honor the forward when submitting multipart
> data. I then manually went and typed the url into a
> browser and submitted a non-multipart form and my
> page
> was redirected.
> 
> Why can't i seem to use the response object of the
> servlet if I'm submitting multipart form data? Is
> there a work around?
> 
> Thanks in advance :)
> Brad
> 
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail SpamGuard - Read only the mail you want.
> http://antispam.yahoo.com/tools
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

---------------------------------------------------------------------
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