aspose file tools*
The moose likes Servlets and the fly likes Stop Request uploading file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Stop Request uploading file" Watch "Stop Request uploading file" New topic
Author

Stop Request uploading file

Dimiter Stoilov
Greenhorn

Joined: Aug 11, 2004
Posts: 10
Hi ranchers,
I have a multipart form uploading file. I want to limit the file upload to say 5mb. Everithing is fine, But with large uploads, request parse the whole input until it show my error.page for the 5mb limitation.

I tried to stop the request parsing the whole file.
Tried by redefining the request it in ServletRequestWrapper, changing its getInputStream method, throwing exceptions, calling RequestDispatcher, but no successs. Request have to parse whole file, after that it shows me whatever i told him to do.

Can you answer me is this HTTP protocol requirement or any hacks to stop the request?

Thank you for you time
 
 
subject: Stop Request uploading file