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.
posted 14 years ago
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