• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Stop Request uploading file

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
reply
    Bookmark Topic Watch Topic
  • New Topic