• 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

com.oreilly.servlet MultipartRequest weirdness

 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is anyone out there experiencing any weirdness when using the above stated package/class. When i upload a file that is larger than what maxSize (MultipartRequest.maxSize) I am dead in the water. Netscape will even throw up a error dialog box stating that a network error occured while sending data: connection aborted. I am catching the IOEception but somoething else is happening (to the request object?) that I cannot figure out.
any insight on this would be greatly appreciated
pjw
 
Paul Wetzel
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found the answer on suns dev con. the call to request.getContentLength() was the root of the evil. I am not sure why this call was screwing things up but the solution is:
if the value returned by request.getContentLength() is to big you need to get the servlet input stream and "flush" it like this

where theLength is the value from
then you can use the request object w/ no weirdness
[This message has been edited by Paul Wetzel (edited September 18, 2000).]
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can i use oreilly in JSP if yes how
help sorted
mail me at akshaymahajan@hotmail.com
 
Can't .... do .... plaid .... So I did this tiny ad instead:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic