Hello, 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: <HTML><HEAD> <TITLE>L675FoServlet</TITLE> </HEAD> <BODY bgcolor='#99ccff' link=blue vlink=purple> <table bgcolor='0000FF' cellpadding=0 cellspacing=0><td width=652 align='center'> <script language = "JavaScript"> window.setTimeout("window.location.href = 'http://...servlet URL with parameters';", 15000); </script> </BODY> </HTML> 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 page 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 button: <HTML> <HEAD> <script> function reload(){window.location.href ='URL';} </script> </HEAD> <BODY bgcolor="#99ccff"> <form> <input type="button" onClick="javascript:reload();" value="Ricarica"> </form> </BODY> </HTML> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]