Results 1 to 1 of 1
- 09-30-2011, 08:52 PM #1Member
- Join Date
- Sep 2011
- Rep Power
Java's HttpServletResponse doesn't have isClientConnected method
I'm implementing a long poll http connection using java servlet.
How can I know that the http client is still active at any instance? Currently, what I do is to write a byte to the output stream and flush data. If there's an IO exception then the client is dead.
But in ASP.NET there is a property, Response.IsClientConnected which can find out if the client is active without writing anything to the output stream.
I want to know how if it is possible to develop in java servlet. I do not want to keep writing data into the http response stream as it may cost network.
More discussions had been carried out here:servlets - Java's HttpServletResponse doesn't have isClientConnected method - Stack Overflow but no solution in actual
Thanks in advance.
- By sumved.shami in forum Java ServletReplies: 4Last Post: 02-02-2012, 04:58 AM
- By ashok bhagat in forum Advanced JavaReplies: 0Last Post: 09-09-2011, 09:21 AM
- By JohnPringle83 in forum New To JavaReplies: 6Last Post: 05-31-2011, 09:22 PM
- By LianaN in forum AWT / SwingReplies: 2Last Post: 11-30-2010, 07:53 PM
- By dickydevry in forum JavaServer Pages (JSP) and JSTLReplies: 2Last Post: 08-31-2010, 10:02 AM