----- Original Message -----
From: "Scott E Herter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>

Hi,

If you post the relevant section of your code, JDK Version/platform/servlet
containter, it might be easier to spot the problem.



>  I create my HTTPUrlConnection
> object, get an output stream and start sending bytes.

Some points to take care.
1. Always set the content length of the file you are going to send using the
method UrlConnection.setRequestProperty("Content-Length", size) where size
is the length of the file in bytes, before getting the output stream.
2. Try to call the flush() method intermittently on the OutputStream.


> The servlet opens an
> input stream from the req object and starts reading them.

Try to write to a temp file while reading the request, if your file is very
big, otherwise you may end up with OutOfMemoryException on the server side,
when you get the file on the server side.


>  At least, that is how
> I thought it would work.  It seams that the client is buffering the data
until a
> close is issued on the stream.

I think this is how it should work. Pl. Post the relevant code.


Regds,
Gokul

>
> Thanks,
>
> Scott Herter
> Advisory Software Developer
> Pitney Bowes Inc.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to