Skip to Main Content

jsp using out.flush() with no effect on Windows 7 IE9

939266May 23 2012 — edited May 23 2012
I have several JSPs with long running java code inside. To inform the user about the progress I use this html code

<div id="working">
Current row number: <span id="rowNumber">0</span><br />
Current row data: <span id="rowData">n/a</span><br />
</div>

and within my loop the js snippet to update the counter

%>
<script language=javascript>
document.getElementById("rowNumber").firstChild.nodeValue="<%=rowNumber%>";
document.getElementById("rowData").firstChild.nodeValue="<%=firstValue%>";
</script>
<% out.flush();

This works fine in IE8 on a Windows XP while the JSP is running on a Tomcat 6.0.10 on java 1.6. The user gets the counter updated after each flush(). This could be seen easily in the source code and the progress of the snippets coming from the JSP back to the client.

Now we change to Windows 7 IE9 on the client (same server setup) and this behaviour doesn't work at all. The counter is never displayed, the browser source code is never updated on the out.flush(). For the user it looks like having no counter behaviour at all!

It looks like the Win7 TCP/IP stack (or Java?) buffer the javascript snippets and therefore the browser could not render the counter.

Has anybody an idea why this happens? And is there another trick to get a "counter" working with a long running jsp on Win 7?

Best regards

Edited by: 936263 on May 23, 2012 8:53 AM
Post Details
Locked due to inactivity on Jun 20 2012
Added on May 23 2012
0 comments
481 views