title: HttpServletResponse : How to determine if the underlying connection is still open?
body: <p>This is how it goes : A web based application running on Tomcat 6. A client sends a request to the server, server does some processing, makes a redirect to 3rd Party URL and again does some processing.</p>
  
  <p>Before doing redirect, I want to know if the client connection is still open or not (so that I can prevent the second processing). I know sendRedirect throws IOException &amp; IllegalStateException and those can be handled in case redirect fails.</p>
  
  <p>I have also tried to obtain the output stream from response and write any junk characters to the stream. But to no use (even if I remove the client machine from the LAN, after invoking the request)</p>
  
  <p>I want to know - is there any way I can identify if the connection between Client and Server is still active?</p>