Lin, thanks for your input, that's very helpful!
I think I will give up trying SO_KEPPALIVE, even I set up everything right, the firewall or proxy still kills the connection at 5 minutes, so I guess keep-alive doesn't work in my case.
I don't have the freedom to change my page to async or refresh itself due to many reasons.
Howerver, I found in my
test jsp page, if I do out.flush(" ") at 1 or 2 minutes interval, it will keep my connection going, so I guess that could be a solution.
suppose my JSP code is like this,
<%
...
Obj.heavyProcess();
...
%>
How can I start a new
thread to do out.flush(" ") while the heavyProcess is going on? If I can do that, I think the problem could be solved.
Thanks!