Using JBoss 4.0.2 w/ embedded tomcat
I'm trying to limit the max size for file uploads when processing mulitpart/form-data request.
When the request comes into the servlet I check the content length and if it's too big then I try to close the request input stream and send the response imediately by calling response flush and close.
The problem is the browser (both IE 6 and Firefox 1.5) keep sending all the bytes for the request and doesn't process the response until the request has totally been sent. I verified this using the Carles Web Proxy Debugging tool, http://www.xk72.com/charles/.
Any ideas on how to handle this properly?
Thanks,
Paul