tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Venuti" <>
Subject servlet problem with tomcat 4.0.4
Date Wed, 22 Oct 2003 15:40:20 GMT

I have a servlet that generates a PDF document. The generation task is quite
long, so I have decided to do it in an asyncronous way:

the servlet receives the request of generating the document and outputs a
"waiting" HTML page that submit a request to the servlet, after a predefined
lap of time (using a javascript "setTimeout" function), asking if the
document is ready:

<BODY bgcolor='#99ccff' link=blue vlink=purple>
<table bgcolor='0000FF' cellpadding=0 cellspacing=0><td width=652
		<script language = "JavaScript">
			window.setTimeout("window.location.href = 'http://...servlet URL with
parameters';", 15000);

If the document is ready it is presented to the user else the servlet
generates another HTML page with the same lap of time of the previous HTML

Everything works nice with Netscape (4.7).
The problems arise with MS Explorer (tested with versions 5.0, 5.5 or 6.0).

Testing the application we notice that:

1) The servlet generates the first HTML waiting page correctly
2) The first invocation of the subsequent page fails to be activated after
the predefined amount of time but is waiting until the completation of the
generation of document from the servlet

So we decided to comment out the setTimeout function and to put an HTML

	function reload(){window.location.href ='URL';}
<BODY bgcolor="#99ccff">

<input type="button" onClick="javascript:reload();" value="Ricarica">


when the user pushes it the page should make another invocation.
This doesn't happend until the completation of the document.
Most strange if the user clicks two times, the second invocation has effect
immediatly, but finally, when the document is generated, fails to retrieve
it because someone else seems to be listing for it (maybe is the first
invocation hanging up?).
We are using Tomcat 4.0.4.

Please help me if someone can imagine a possible solution.
Thanks in advance

Ivan Venuti

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message