• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Upload files gives an OutOfMemoryError

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I am writting a Java Client to upload a file to a Servlet.
I have used the URL class to do this, and i am using a Tomcat webserver.
I am able to upload files upto 35MB to the server, however, i am unable to upload file larger than this. I recieve an OutOfMemoryError if i try to upload file larger than this.
Can someone provide me with any help regarding this.

Regards
Rudolf
 
Rudolf Castelino
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have found the error.
When one opens a stream to a URL, and then tries to write to the ouputstream, the contents are written to the memory of the local machine.
In order to send the data to the URL, one has to request a response code from the URL
 
I brought this back from the farm where they grow the tiny ads:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic