Problem closing connection in HTTPServletResponse

N

Naresh Agarwal

Hi

I'm developing a webapp using servlets, which processes a HTTP Post
request and sent back MIME message (multipart/related - essentially
SOAP message with Attachments).

I'm constructing the MIME message manually (as I need to stream it to
the client) and writing it to OutputStream (few bytes everytime).

In the end, I close the OutputStream, but still client keeps on
waiting on the socket and it never get -1, while it reads from the
InputStream.

Thus server is not closing the socket even after closing the
OutputStream.

This problem occurs only when I set the content type header in servlet
response as multipart/related. The problem does not occur if I've to
send text/xml or multipart/mixed data.

Does anybody has any clue on it?

thanks & regards,
Naresh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top