Is there way to enfore HTTPServletResponse to close the socket

From: Naresh Agarwal (nagarwal_at_informatica.com)
Date: 05/29/04


Date: 29 May 2004 01:49:49 -0700

Hi

I want HTTPServletResponse to *close* the socket after sending the
response. For this I'm closing the OutputStream after writing the
data. But still socket is not closed and client keeps on waiting to
read data from socket.

And surprisingly this happens only if I use multipart/related in
Content-Type in the response.

Is there way to enfore HTTPServletResponse to close the server socket?

Also, is there any relation between setConentLength header of
HTTPServletResponse and whether the server will "keep-alive" the
socket connection?

thanks,
Naresh



Relevant Pages

  • HTTPServletResponse is not closing the socket connection
    ... I want HTTPServletResponse to *close* the socket after sending the ... For this I'm closing the OutputStream after writing the ... Is there way to enfore HTTPServletResponse to close the server socket? ...
    (comp.lang.java.help)
  • what is the relation between HTTPServletResponse setContentLength header and keep-alive
    ... HTTPServletResponse and whether the server will "keep-alive" the ... I want HTTPServletResponse to *close* the socket after sending the ...
    (comp.lang.java.programmer)
  • Re: Socket recv() question?
    ... You might be doing something crazy, writing the data to the file one byte at ... socket function correctly? ... How come when I use the IE on the Pocket PC and started IIS on my PC. ... Configure tx timeout ...
    (microsoft.public.windowsce.app.development)
  • Re: Are write() calls guaranteed atomic?
    ... >> writing the data have no knowledge of the FIFO, ... > If you cannot modify the clients, try changing your server to create a ... > Unix domain socket instead of a named pipe (the clients shouldn't see ...
    (freebsd-hackers)
  • Re: C++ problem with a destructor
    ... > and write a data file to the file ... > descriptor (socket). ... > because, for kicks and grins, I tried writing a simple program to test ... add a private copy constructor and assignment operator and ...
    (alt.comp.lang.learn.c-cpp)