Or what you can do is to print "please wait" only from the servlet that takes some time. No w you chave 2 choices:
1. you can write a form in th response of the servlet and submit it on body onload. then it goes from the browser to a new resource that displays the actual page whose processing does not take time; or 2. you can use. response.sendRedirect using some query string to a new resource, whose processing does not take much time regards, Partha -----Original Message----- From: minos [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2003 6:35 AM To: [EMAIL PROTECTED] Subject: Re: redirect a page I once had to do exactly the same thing.The problem is that if you first send a response that prins "Please Wait" then you can't just take it back and send the actual response.You must first send the please wait page and the very first thing to do in this page is send a new resuest for the actual response (=a redirect to the actual response page) Two problems: - You can't have an animated gif running on the please wait page.When redirection begins the gif stops moving! - If the user minimize and restore browser window, all page content will seem blank. The above way works, but it's not at all flexible.Perhaps javascript could be an alternative.I suggest you do it the redirection way only if are in a hurry. The redirection code (here is merely a refresh ) will look like that: <meta http-equiv="refresh" content="2; URL=getRecs"> inside the <head> f the html ----- Original Message ----- From: Alvin Chang To: [EMAIL PROTECTED] Sent: Thursday, March 06, 2003 10:21 PM Subject: redirect a page Hi, I have a servlet which would take a while to generate the output and I was wondering if someone would let me know how to show a "please wait" on browser until the final output is complete. code snippet would be great. -Alvin Chang -- http://www.freemail.gr - ������ �������� ������������ ������������. ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ********************************************************************* Disclaimer: The information in this e-mail and any attachments is confidential / privileged. It is intended solely for the addressee or addressees. If you are not the addressee indicated in this message, you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. ********************************************************************* ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
