Results 1 to 1 of 1
- 09-30-2011, 08:52 PM #1
Member
- Join Date
- Sep 2011
- Posts
- 1
- Rep Power
- 0
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.
Similar Threads
-
How to get content from HttpServletResponse
By sumved.shami in forum Java ServletReplies: 4Last Post: 02-02-2012, 04:58 AM -
How to get the header which is set in HttpServletResponse object
By ashok bhagat in forum Advanced JavaReplies: 0Last Post: 09-09-2011, 09:21 AM -
keyPressed method doesn't work as intended
By JohnPringle83 in forum New To JavaReplies: 6Last Post: 05-31-2011, 09:22 PM -
The insertNodeInto method doesn't work for my JTree
By LianaN in forum AWT / SwingReplies: 2Last Post: 11-30-2010, 07:53 PM -
The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding
By dickydevry in forum JavaServer Pages (JSP) and JSTLReplies: 2Last Post: 08-31-2010, 10:02 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks