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.
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 & IllegalStateException and those can be handled in case redirect fails.
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)
I want to know - is there any way I can identify if the connection between Client and Server is still active?