There's a little paragraph explaining this behavior in the middle of p.
119 of my book.  It was asked so often in the 1st Ed I added it to the
2nd Ed.  http://www.servlets.com/jservlet2/ for more info on the book.

Summarizing a paragraph down into a sentence: the server may sever the
connection to protect itself from reading the upload, and the client may
not read the server's error page sent before the severing.

-jh-

rod wrote:
>
> Hi ,
> I got a problem in multipart-request, I use o'reilly package to upload file.
> My object is first determine size upload is bigger  than accepted size of
> user account or not, then let them upload or not.
> It upload and redirect ok when size are small enough to the space, but when
> it larger then the spaceleft , the browser seem to be freezze long anh
> redirect method do not work right ( out.println still work). (I'm use
> servlet 2.0)
>
>   my code
> ...
> int space_letf;
>    ..........
>   // get space_left
> int up_size=(int)request.getContentLength();
> if (space_left > up_size)
> {
>   // upload file
>   //  write cokies "upload ok"
> }
> else
> {
>   //  write cokies "account full"
> }
>
> res.sendRedirect("http://url";);
>
> //////
> everytime upload ok the res.sendRedirect("http://url";) work perfect
> but reversed is not!
> any one can tell me.
>
> Rgrd
> Rod
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to