After looking into this further many belive the problem lies with the call
to res.getContentLength that is casuing a problem on the underlying server.
So the simple soloution to the problem seems to be to modify the
MultipartRequest class to allow it to work as follows.

if (file is to large){
        read through file
        error file to large
}
else{
        write whilst reading through file
        yippie all was fine
}

This works fine, but i was wondering if anyone can think of any drawbacks in
terms of server performance.

-----Original Message-----
From: Jason Hunter [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 05, 2000 8:31 PM
To: [EMAIL PROTECTED]
Subject: Re: Problem with UploadServlet Running underJSERV


Mark Edgington wrote:
>
> The catch is working and i have attempted to send a message
> to both screen and file from the catch.
>
> a) screen: this just casues a server error and you can't even send a
> different server error
> b) file: this works fine but you stil get the server error.

So you're saying that when some part of your servlet throws an
IOException and another part catches it, then you can't send any
output to the client?  That sounds strange.  I suggest you simplify
the code until you make it work again, then figure out what caused it
not to work.  Start by just throwing and catching a plain old
IOException directly for example.

-jh-

--
Jason Hunter
[EMAIL PROTECTED]
Book:    http://www.servlets.com/book
2.0 to 2.1: http://www.javaworld.com/jw-12-1998/jw-12-servletapi.html
2.1 to 2.2: http://www.javaworld.com/jw-10-1999/jw-10-servletapi.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

___________________________________________________________________________
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