Hello,

Thanks for your help.

I've tried it but the response (Internal Server Error) is displayed after the whole file is send...

trying to flush doesn't help either:
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
response.flushBuffer();
response.getWriter().close();


Greetings and Thanks
Peter



From: Tim Funk <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: Tomcat Users List <[EMAIL PROTECTED]>
Subject: Re: how to close request input stream
Date: Tue, 23 Sep 2003 11:02:26 -0400

Try this and see what happens:

protected void doPost(HttpServletRequest req, HttpServletResponse resp) {
    if(req.getContentLength()>TOO_MUCH)
       resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
    ...
}

I am unsure of how much date is read before the servlet is called. (Which is probably the crux of the problem)


-Tim



Peter H. wrote:


I tried a file upload field up to 100MB
I tried textfield/textareas up to 600kb ( i must use a slow connection )

it looks like the complete request is send? dont know if tomcat or apache receives those bytes - or in other words - my program leaves its service method...

to Tim Funk: What status can I set and respond with my previous form?
I guess I've tried that but also I see incoming bytes in my network interface...





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
Sehen, wer online ist: Mit dem MSN Messenger! http://messenger.msn.de Jetzt kostenlos downloaden und mitmachen!



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to